  We perform a Hamiltonian analysis and prove that a large class of
scalar-tensor theories whose Lagrangian is given by a generic function
$F\left(K_{ab},N,R_{ab},h^{ab},\nabla_a,t\right)$ is free from the Ostrogradsky
ghost, and thus these theories contain at most 3 degrees of freedom at
classical level.
