#include #include #include #define rep(i, n) for (int i = 0; i < n; i++) #define all(x) x.begin(), x.end() using namespace std; int main() { int n; cin >> n; vector A(n); rep(i, n) { cin >> A[i]; } sort(all(A)); int ans = 0; bool flg = false; rep(i, n) { if (!flg && (i == n || A[i] != A[i + 1])) { ans++; } if (i != n) { flg = A[i] == A[i + 1] ? true : false; } } cout << ans << endl; }