#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 1;
const int inf = 1e9 + 7;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x;
}
int n, a[N];
bool in[N];
int main() {
  n = read();
  for (int i = 1; i <= n; ++i) a[i] = read();
  int ans = 1;
  printf("%d ", ans);
  in[n + 1] = 1;
  for (int i = 1, tot = n + 1; i <= n; ++i) {
    in[a[i]] = 1;
    while (in[tot - 1]) tot--;
    printf("%d ", i - (n - tot));
  }
}
