#include <bits/stdc++.h>
int main() {
  int n, cnt;
  scanf("%d", &n);
  int p[n];
  for (int i = 0; i < (int)(n); i++) scanf("%d", p[i]);
  for (int i = 0; i < (int)(n); i++)
    if (p[i] != i + 1) cnt++;
  printf("%d", cnt);
  return 0;
}
