#include <iostream>
using namespace std;
int tab[1000001];
int main() {
int n, x, ile = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x;
tab[x]++;
}
for (int j = 0; j <= 1000000; j++) {
if (tab[j] == 1) {
ile++;
}
}
cout << ile;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgdGFiWzEwMDAwMDFdOyAKaW50IG1haW4oKSB7CiAgICBpbnQgbiwgeCwgaWxlID0gMDsKICAgCWNpbiA+PiBuOwogICAgCiAgICBmb3IgKGludCBpID0gMDsgaSA8IG47IGkrKykgewogICAgICAgIGNpbiA+PiB4OwogICAgICAgIHRhYlt4XSsrOwogICAgfQoKICAgIGZvciAoaW50IGogPSAwOyBqIDw9IDEwMDAwMDA7IGorKykgewogICAgICAgIGlmICh0YWJbal0gPT0gMSkgewogICAgICAgICAgICBpbGUrKzsKICAgICAgICB9CiAgICB9CgogICAgY291dCA8PCBpbGU7CgogICAgcmV0dXJuIDA7Cn0=