Problem

Source: Swiss Imo Selection 2006

Tags: geometry, algebra proposed, algebra



Let $n\ge5$ be an integer. Find the biggest integer $k$ such that there always exists a $n$-gon with exactly $k$ interior right angles. (Find $k$ in terms of $n$).