  By assuming the kinetic coupling $f^{2}(\phi)FF$ of the effective inflaton
field $\phi$ with the electromagnetic field, we explore magnetogenesis during
the inflation and preheating stages in the Starobinsky model. We consider the
case of the exponential coupling function $f(\phi)=\exp(\alpha\phi/M_{p})$ and
show that for $\alpha \sim 12-15$ it is possible to generate the large scale
magnetic fields with strength $\gtrsim 10^{-15}$ Gauss at the present epoch.
The spectrum of generated magnetic fields is blue with the spectral index
$n=1+s$, $s>0$. We have found that for the relevant values of the coupling
parameter, $\alpha=12-15$, model avoids the back-reaction problem for all
relevant modes.
