#include <bits/stdc++.h>
using namespace std;
int parent[200007];
int find_set(int a) {
  if (parent[a] == a) return a;
  return parent[a] = find_set(parent[a]);
}
int union_set(int a, int b) {
  int x = find_set(a);
  int y = find_set(b);
  if (x != y) {
    parent[y] = x;
    return 1;
  }
  return 0;
}
void solve() {
  for (int i = 1; i < 200007; i += 1) parent[i] = i;
  int n;
  cin >> n;
  for (int i = 1; i < n + 1; i += 1) {
    int a;
    scanf("%d", &a);
    if (a != 0 and find_set(a) == a) {
      parent[a] = i;
    }
  }
  int cnt = 1;
  for (int i = 1; i < n; i += 1) {
    cnt += union_set(i, i + 1);
  }
  cout << cnt << "\n";
}
int32_t main() {
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
