#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 50;
int n, at[N], vn = 1, last[N], now;
int main() {
  scanf("%d", &n);
  at[0] = 1;
  last[1] = 0;
  now = 1;
  for (int i = 1; i <= (n); ++i) {
    int t;
    scanf("%d", &t);
    int p = at[t];
    if (last[p] == t) {
      now = p;
      at[i] = p;
      last[p] = i;
    } else {
      now = ++vn;
      at[i] = vn;
      last[vn] = i;
    }
  }
  printf("%d\n", vn);
  return 0;
}
