public static void main(String[] args) {
		{
			boolean bool = new Ants().solve(10, new int[] { 2, 6, 7 }) == 8;
			System.err.println(bool ? "OK" : "NG");
		}
		{
			boolean bool = new Ants().solve(10, new int[] { 5, 10 }) == 10;
			System.err.println(bool ? "OK" : "NG");
		}
		{
			boolean bool = new Ants().solve(10, new int[] { 1,2,3,4,5,6,7,8,9,10 }) == 10;
			System.err.println(bool ? "OK" : "NG");
		}
		{
			boolean bool = new Ants().solve(10, new int[] { 1,2,3,4,5 }) == 9;
			System.err.println(bool ? "OK" : "NG");
		}
		{
			boolean bool = new Ants().solve(10, new int[] { 1,9 }) == 9;
			System.err.println(bool ? "OK" : "NG");
		}


	}