// yukicoder: No.182 新規性の虜 // 2019.4.13 bal4u #include #include //// 高速入力 #if 0 #define gc() getchar_unlocked() #else #define gc() getchar() #endif int in() // 非負整数の入力 { int n = 0, c = gc(); do n = 10 * n + (c & 0xf), c = gc(); while (c >= '0'); return n; } int a[100005]; int N; int cmp(const void *a, const void *b) { return *(int *)a - *(int *)b; } int main() { int i, ans; N = in(); for (i = 1; i <= N; i++) a[i] = in(); qsort(a+1, N, sizeof(int), cmp); ans = 0; for (i = 1; i <= N; i++) { if (a[i] != a[i - 1] && a[i] != a[i + 1]) ans++; } printf("%d\n", ans); return 0; }