Modified non-local-F(R) gravity as the key for the inflation and dark energy