Question 8
Adel draws an $m \times n$ grid of dots on the coordinate plane, at the points of integer coordinates $(a, b)$ where $1 \leq a \leq m$ and $1 \leq b \leq n$. He proceeds to draw a closed path along $k$ of these dots, $(a_{1}, b_{1}),(a_{2}, b_{2}), \ldots,(a_{k}, b_{k})$, such that $(a_{i}, b_{i})$ and $(a_{i+1}, b_{i+1})$ (where $(a_{k+1}, b_{k+1})=(a_{1}, b_{1})$ ) are 1 unit apart for each $1 \leq i \leq k$. Adel makes sure his path does not cross itself, that is, the $k$ dots are distinct. Find, with proof, the maximum possible value of $k$ in terms of $m$ and $n$.