#include <bits/stdc++.h>
using namespace std;
namespace IO {
const int __buffsize = 1000000;
char __buff[__buffsize];
char *__buffS, *__buffT;
char getch() {
  if (__buffS == __buffT) {
    __buffT = (__buffS = __buff) + fread(__buff, 1, __buffsize, stdin);
    if (__buffS == __buffT) return EOF;
  }
  return *__buffS++;
}
int read() {
  int T = 0, f = 1;
  char c = getchar();
  while ((c < '0' || c > '9') && (c != '-')) c = getchar();
  if (c == '-') f = -1, c = getchar();
  while (c >= '0' && c <= '9') {
    T = ((T << 1) + (T << 3)) + c - 48;
    c = getchar();
  }
  return T * f;
}
void write(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar((x % 10) + '0');
}
void writeln(int x) {
  write(x);
  puts("");
}
};  // namespace IO
using namespace IO;
int n, ans;
bool vis[(int)2e5 + 10];
int t[(int)2e5 + 10];
int main() {
  n = read();
  for (int i = 1; i <= n; i++) t[i] = read();
  memset(vis, false, sizeof(vis));
  for (int i = n; i >= 1; i--) {
    if (!vis[i]) {
      ans++;
      int u = i;
      while (!vis[u]) {
        vis[u] = true;
        u = t[u];
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
