In a regular $2n$-gonal prism, bases $A_1A_2\cdots A_{2n}$ and $B_1B_2\cdots B_{2n}$ have circumradii equal to $R$. If the length of the lateral edge $A_1B_1$ varies, the angle between the line $A_1B_{n+1}$ and the plane $A_1A_3B_{n+2}$ is maximal for $A_1B_1=2R\cos\frac\pi{2n}$.