#include <bits/stdc++.h>
int p[300004] = {
    0,
};
int anslist[300004] = {
    0,
};
bool status[300004] = {
    0,
};
int main(void) {
  int n, i, j;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &p[i]);
  }
  int currentans = 0, lastestX = 0;
  anslist[0] = 1;
  for (i = 0; i < n; i++) {
    int index = p[i];
    currentans++;
    status[index] = 1;
    if (index == n - lastestX) {
      while (status[n - lastestX] == 1) {
        lastestX++;
        currentans--;
      }
    }
    anslist[i + 1] = currentans + 1;
  }
  for (i = 0; i <= n; i++) printf("%d ", anslist[i]);
  return 0;
}
