The Hamiltonian H is, surprisingly enough, H = 0. In light of the observation that the Hamiltonian is only defined up to the equivalence class of smooth functions agreeing on the constrained subspace, we can use a new Hamiltonian H '= f instead. Then, we have the interesting case where the Hamiltonian is the same as a constraint! See Hamiltonian constraint for more details.