import java.util.Arrays; import java.util.HashSet; import java.util.Scanner; public class Main { public static int solve(int[] A){ int count = 0; boolean flag = false; HashSet cheack = new HashSet(); Arrays.sort(A); for(int now : A){ if (!cheack.contains(now)) { cheack.add(now); count++; flag = true; } else { if (flag) { count--; } flag = false; } } if(count > 0) return count; else return 0; } public static void main(String[] args){ Scanner S = new Scanner(System.in); int N = S.nextInt(); int A[] = new int[N]; for (int i = 0; i < N; i++) { A[i] = S.nextInt(); } System.out.println(solve(A)); } }