#include <bits/stdc++.h>
using namespace std;
int n;
int ans;
int v[200010];
int vis[200010];
void dfs(int x) {
  vis[x] = 1;
  if (vis[v[x]] == 0) dfs(v[x]);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> v[i];
  for (int i = n; i >= 1; i--)
    if (vis[i] == 0) {
      ans++;
      dfs(i);
    }
  cout << ans;
}
