#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define INF (1 << 30) #define INFLL (1LL << 60) int main() { int n,A[100000]; int ans = 0; cin >> n; for(int i = 0;i < n;i++){ cin >> A[i]; } sort(A,A+n); for(int i = 0;i < n;i++){ if(i == 0 && A[i] != A[i+1]) ans++; else if(i == n - 1 && A[i] != A[i-1]) ans++; else if(A[i] != A[i+1] && A[i] != A[i-1]) ans++; } cout << ans << endl; return 0; }