Elementary Statistics (12th Edition)

If $\hat{p}$ is known:$n=\frac{z^2_{\frac{\alpha}{2}}\cdot \hat{p}\cdot (1-\hat{p})}{E^2}.$ If $\hat{p}$ is unknown:$n=\frac{z^2_{\frac{\alpha}{2}}\cdot0.25}{E^2}.$ Here, $\hat{p}$ is known, it is 15%=0.15, hence $n=\frac{2.575^2\cdot(0.15)\cdot(1-0.15)}{0.05^2}=339.$