if(m*n<2*k){ System.out.println(-1); }else{ System.out.println((int)(Math.log(k-1)/Math.log(2))+1); }