#include <bits/stdc++.h>
using namespace std;
int par[10000000];
int root(int n) {
  if (par[n] < 0) return n;
  return root(par[n]);
}
int merge(int x, int y) {
  x = root(x);
  y = root(y);
  if (x == y) return 0;
  if (par[x] > par[y]) swap(x, y);
  par[x] += par[y];
  par[y] = x;
  return 0;
}
int mark[10000000];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i <= n + 1; i++) {
    par[i] = -1;
    mark[i] = 0;
  }
  mark[n + 1] = 1;
  printf("1 ");
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    mark[x] = 1;
    if (mark[x + 1] == 1) merge(x, x + 1);
    if (mark[x - 1] == 1) merge(x - 1, x);
    printf("%d ", i + 2 + par[root(n + 1)]);
  }
  return 0;
}
