The modified gravity, which eliminates the need for dark energy and which
seems to be stable, is considered. The terms with positive powers of the
curvature support the inflationary epoch while the terms with negative powers
of the curvature serve as effective dark energy, supporting current cosmic
acceleration. The equivalent scalar-tensor gravity may be compatible with the
simplest solar system experiments.Comment: 23 pages, 3 figures, discussion is extended, references added,
version to appear in PR