import java.util.Arrays; import java.util.Scanner; public class HelloWorld { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] ai = new int[n]; for (int i = 0; i < n; i ++) { ai[i] = sc.nextInt(); } sc.close(); Arrays.sort(ai); int count = 1; int mod = ai[0] % 2; for (int i = 1; i < n; i ++ ) { if (ai[i] % 2 != mod && ai[i] - 1 <= ai[i - 1]) { count = 2; } mod = ai[i] % 2; } System.out.println(count); } }