#define _USE_MATH_DEFINES #include #include #include #include #include #define rep(i, n) for(int i = 0; i < (int)(n); i++) using namespace std; int main() { int n; cin >> n; vector a(n); vector b(n+1); //メモ用 rep(i, n) cin >> a[i]; rep(i, n) b[a[i]]++; int cnt = 0; rep(i, n+1) if (b[i] == 1) cnt++; cout << cnt << endl; return 0; }