#include #include #include int main(void) { int n, *a; char str[32], *ch; scanf("%d%*c", &n); a = malloc(sizeof(int)*n); fgets(str, sizeof(str), stdin); ch = strtok(str, " \n"); for (int i = 0; i < n; i++) { if (ch == NULL) break; else a[i] = atoi(ch); ch = strtok(NULL, " \n"); } int x, sum = 0; for (int i = 0; i < n; i++) { x = 0; for (int j = 0; j < n; j++) if (a[i] == a[j]) x++; if (x > 1) sum++; } sum = n - sum; printf("%d\n", sum); free(a); return 0; }