#include <bits/stdc++.h>
using namespace std;
int a[300005], b[300005];
int main() {
  int t, k, i, j, n, m, x, y, q, c, d;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &b[i]);
    b[i]--;
  }
  c = 0, j = n - 1;
  i = 0;
  printf("1 ");
  while (n--) {
    k = b[i];
    i++;
    a[k] = 1;
    c++;
    while (j >= 0 && a[j] == 1) j--, c--;
    printf("%d ", c + 1);
  }
  return 0;
}
