f(R) theories of gravity in the Palatini approach matched with observations