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