#include #include using namespace std; int main() { int N; cin >> N; vector cnt( N+1, 0 ); for( int i = 0; i < N; i++ ) { int tmp; cin >> tmp; cnt[tmp]++; } int res = 0; for( int i = 1; i <= N; i++ ) { if( cnt[i] == 1 ) { res++; } } cout << res << endl; return 0; }