import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static int[][] getKnightSteps(int n){ int[][] result=new int[n-1][n-1]; for(int i=0; i=625) return -1; else return board[n-1][n-1]; } private static void goNextStep(int[][] board, int base_i, int base_j, int new_i, int new_j){ if (isValid(new_i, new_j, board.length) && updateBoard(board, base_i, base_j, new_i, new_j)) getSteps(board, new_i-base_i, new_j-base_j, new_i, new_j ); else return; } private static boolean isValid(int new_i, int new_j, int board_l){ return (new_i=0 && new_j=0); } private static boolean updateBoard(int[][] board, int base_i, int base_j, int new_i, int new_j){ if(board[new_i][new_j]<=(board[base_i][base_j]+1)) return false; else{ board[new_i][new_j]=board[base_i][base_j]+1; return true; } } public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); // your code goes here int[][] ret=getKnightSteps(n); for(int i=0; i