Hamiltonian of a free neutron in curved spacetime on the Earth