public static void main(String[] args){
		int uniqueOdd[] = new int[29];
		int uniqueEven[] = new int[9];
		for(int i = 3; i <=31; i ++){
			uniqueOdd[i-3] = i*(i+1);
		}
		int[] z = new int[1001];
		
		for(int i = 2; i <=10; i ++){
			uniqueEven[i-2] = 4*i*(2*i+1);
		}
		int k = 1;
		for(int i = 0; i < uniqueOdd.length; i ++){
			//System.out.println(i);
			while(k*uniqueOdd[i]<=1000){
				z[k*uniqueOdd[i]]++;
				k++;
			}
			k=1;
		}
		
		for(int i = 0; i < uniqueEven.length; i ++){
			//System.out.println(i);
			while(k*uniqueEven[i]<=1000){
				z[k*uniqueEven[i]]++;
				k++;
			}
			k=1;
		}
		int max = 0;
		int maxnum = 0;
		for(int i = 0; i < z.length; i ++){
			//System.out.println(i);
			if(z[i]>max){
				maxnum = i;
				max = z[i];
			}
		}
		System.out.println(maxnum);
	}