#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; typedef vector vll; typedef vector vi; typedef vector> vvi; typedef vector> vvll; const ll inf = 1e16; const ll md = 1000000007; int main() { int n; cin >> n; vi a(n); rep(i, n) cin >> a[i]; int ans = 0; map cnt; rep(i, n) cnt[a[i]]++; for (pair p : cnt) if (p.second == 1) ans++; cout << ans << endl; return 0; }