import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int arr[][]=new int[n][n]; for(int a=1;a delta ) return 2 * ( ( y - delta ) / 3 ) + delta; else return delta - 2 * ( ( delta - y ) / 4 ); } }