#include <iostream>
using namespace std;
const int N = 510,M = 503;
int d[M];
int n;
int find(int x){
int idx = (x % M + M) % M;
while(d[idx] && d[idx] != x){
idx++;
if(idx == M) idx = 0;
}
return idx;
}
int main(){
cin >> n;
int res = 0;
for(int i = 0;i < n;i++){
int temp;
cin >> temp;
if(temp < 0) temp = -temp;
int dix = find(temp);
if(d[dix] == temp) res++;
else d[dix] = temp;
}
cout << res << endl;
return 0;
}