#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e6 + 10;
const int MOD = (int)1e9 + 7;
int n;
int a[N];
bool used[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int ans = 0;
  for (int i = n; i > 0; i--) {
    if (used[i]) continue;
    ans++;
    for (int x = i; !used[x]; x = a[x]) used[x] = 1;
  }
  cout << ans;
  return 0;
}
