#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 3e5 + 5;
using LL = long long;
bool vis[maxn];
int fa[maxn];
int sz[maxn];
int findfa(int x) {
  if (fa[x] != x) fa[x] = findfa(fa[x]);
  return fa[x];
}
int ans;
int n;
void check(int u, int v) {
  if (!vis[u]) return;
  if (!vis[v]) return;
  int x = findfa(u);
  int y = findfa(v);
  if (y == n + 1) {
    ans -= sz[x];
  }
  fa[x] = y;
  sz[y] += sz[x];
}
int main() {
  ans = 1;
  scanf("%d", &n);
  printf("%d", 1);
  vis[n + 1] = 1;
  for (int i = 1; i <= n; i++) {
    fa[i] = i;
    sz[i] = 1;
  }
  vis[n + 1] = 1;
  fa[n + 1] = n + 1;
  for (int i = 1; i <= n; i++) {
    int pos;
    scanf("%d", &pos);
    vis[pos] = 1;
    ans++;
    check(pos, pos + 1);
    check(pos - 1, pos);
    printf(" %d", ans);
  }
  printf("\n");
  return 0;
}
