A canonical formalism of f(R)-type gravity is proposed, resolving the problem in the formalism of Buchbinder and Lyakhovich(BL). The new coordinates corresponding to the time derivatives of the metric are taken to be its Lie derivatives which is the same as in BL. The momenta canonically conjugate to them and Hamiltonian density are defined similarly to the formalism of Ostrogradski. It is shown that our method surely resolves the problem of BL.