The giraffe is a chess piece that moves squares in one direction and then a box in a perpendicular direction. What is the smallest value of such that the giraffe that starts from a corner on an board can visit all the squares of said board?
CL-MO 2016
Chile national mathematics olympiad 2016.