Nonderivative modified gravity: A classification