Cosmology of modified gravity with a non-local f(R)