int main(){ int a[1000000]={},s=0,n,i; scanf("%d",&n); for(;~scanf("%d",&n);)a[n%1000000]++; for(i=0;i<1000000;i++)a[i]-1||s++; printf("%d",s); return 0; }