A monochromatic light is travelling in a medium of refractive index $n=1.6$. It enters a stack of glass layers from the bottom side at an angle $\theta=30^{\circ}$. The interfaces of the glass layers are parallel to each other. The refractive indices of different glass layers are monotonically decreasing as $n_m=n-m \Delta n$, where $n_m$ is the refractive index of the $m^{\text {th }}$ slab and $\Delta n=0.1$ (see the figure). The ray is refracted out parallel to the interface between the $(m-1)^{\text {th }}$ and $m^{\text {th }}$ slabs from the right side of the stack. What is the value of $m$ ?