  We discuss the way of solving the hierarchy problem. We show that starting at
the Planck scale, the three energy scales -- inflationary, electroweak and the
cosmological ones can be restored. The formation of small parameters is
proposed that leads to a successful solution of the problem.
  The tools involved in the process are $f(R)$ gravity and inhomogeneous extra
dimensions.
  Slow rolling of a space domain from the Planck scale down to the inflationary
one gives rise to three consequences: an infinite set of causally disconnected
domains (pocket universes) are nucleated; quantum fluctuations in each domain
produce a variety of different fields and an extra-dimensional metric
distribution; these distributions are stabilized at a sufficiently low energy
scale.
