#include<cstdio>
#include<iostream>
#include<algorithm>
typedef long long ll;
using namespace std;

int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int N,ans = 0;
  cin >> N;
  ll s[N+1]= {};
  for (int i = 1; i < N+1; i++){
    cin >> s[i];
  }
  sort(s,s+N+1);
  for(int i=0;i<N;i++){
    if(s[i]==s[i+1]) ans++;
  }
  cout << ans;
  return 0;
}
