import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] list = new int[n]; for(int i = 0; i < n; i++) { list[i] = sc.nextInt(); } Arrays.sort(list); int count = 0; for(int i = 0; i < n-1; i++) { if(list[i] != list[i+1] ){ count++; if(i == n-2) { count++; } } else { for(int j = i+1; j < n; j++) { if(list[i] != list[j]) { i = j-1; if(i == n-1) { count++; } break; } } } } System.out.println(count); } }