A ray of light refracts from medium 1 into a thin layer of medium 2, crosses the layer and is incident at the critical angle on the interface between the medium 2 and 3 as shown in figure. If the angle of incidence of ray is $\theta$, the value of $\theta$ is :