#include #include #include #include #include using namespace std; int main(){ int n,ans; cin >> n;ans = 0; vector v(n),re(n); for (int i = 0; i < n; i++) { cin >> v[i]; } for (int i = 0; i < n; i++) { int a = v[i] - 1; re[a]++; } for (int i = 0; i < n; i++) { if(re[i] == 1){ ans++; } } cout << ans << "\n"; return 0; }