Classical gravity with higher derivatives