Asymptotic free energy of a system with periodic boundary conditions