Answer
The minimum height is $2.5 R$
Work Step by Step
To find the minimum speed $v$ for which the block does not fall off the top of the loop, we can assume that the centripetal force at the top of the loop is exactly equal to the force of gravity on the block. We can find the minimum speed at the top of the loop.
$F_c = \frac{mv^2}{R} = mg$
$v = \sqrt{g~R}$
We can use conservation of energy to find the minimum initial height $h$ such that the block has a speed of $v = \sqrt{gr}$ at the top of the loop. We can let the potential energy at height $h$ be $PE_0$.
To find the minimum value of $PE_0$, we can let $P_0$ be equal to the sum of the kinetic energy $KE_f$ and the potential energy $PE_f$ at the top of the loop.
$PE_0 = KE_f+PE_f$
$mgh = \frac{1}{2}mv^2+mg(2R)$
$mgh = \frac{1}{2}m(\sqrt{g~R})^2+2mgR$
$h = \frac{1}{2}R+2R$
$h = 2.5~R$
The minimum height is $2.5 R$.