#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; long long MOD = 1000000007; int main() { int ans = 0; int N; cin >> N; vector A(N); for ( int i = 0; i < N; i++ ) { cin >> A[i]; } sort( A.begin(), A.end() ); for ( int i = 0; i < N; i++ ) { bool is_new = true; if ( i && A[i-1] == A[i] ) { is_new = false; } if ( i != N-1 && A[i] == A[i+1] ) { is_new = false; } if ( is_new ) { ans++; } } cout << ans << endl; return 0; }