import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int[] A = new int[N]; for (int i = 0; i < N; i++) { A[i] = scanner.nextInt(); } Arrays.sort(A); int count = 0; if (A[0] != A[1]) { count++; } for (int i = 1; i < N - 1; i++) { if (A[i - 1] != A[i] && A[i] != A[i + 1]) { count++; } } if (A[N - 2] != A[N - 1]) { count++; } System.out.println(count); } }