void main(){
  import std.stdio, std.string, std.conv, std.algorithm;

  int n; rd(n);
  auto a=readln.split.to!(int[]);

  auto freq=new int[](n+1);
  int cnt=0;
  foreach(e; a){
    if(e>n) cnt++;
    else freq[e]++;
  }
  for(int i=1; i<=n; i++){
    if(i<freq[i]) cnt+=(freq[i]-i);
    else if(i>freq[i]) cnt+=freq[i];
  }

  writeln(cnt);
}

void rd(T...)(ref T x){
  import std.stdio, std.string, std.conv;
  auto l=readln.split;
  assert(l.length==x.length);
  foreach(i, ref e; x){
    e=l[i].to!(typeof(e));
  }
}
void wr(T...)(T x){
  import std.stdio;
  foreach(e; x) stderr.write(e, " ");
  stderr.writeln();
}