We develop a method for estimating a classical partition function for a. sy
stem of N particles that reduces it to the partition function of a scalar f
ield model of the sine-Gordon type. We find the free energy of a system of
magnetic vortices in a thin-layer semiconductor and investigate its equilib
rium properties in the leading order of the perturbation theory, which corr
esponds to a circle approximation for a particle system.