Free energy functional for nonequilibrium systems: an exactly solvable case.