A 'long knight' moves on a square grid. A single move consists of moving three squares in one direction (horizontally or vertically) and then one square at right angles to the first direction. What is the smallest number of moves a long knight requires to go from one corner of an square board to the diagonally opposite corner?