#include<bits/stdc++.h>
using namespace std;
int n,a,i,ans;
map<int,int>m;
map<int,int>::iterator it;
int main(){
	scanf("%d",&n);
	for(i=1;i<=n;++i)scanf("%d",&a),++m[a];
	for(it=m.begin();it!=m.end();++it){
		int x=it->first,y=it->second;
		ans+=y>=x?y-x:y;
	}
	return printf("%d\n",ans),0;
}