#include <bits/stdc++.h>
using namespace std;
const int NMAX = 300005;
int par[NMAX], rang[NMAX], sz[NMAX];
void make_set(int v) {
  par[v] = v;
  sz[v] = 1;
  rang[v] = 0;
}
int find_set(int v) { return (v == par[v]) ? v : (par[v] = find_set(par[v])); }
void union_sets(int a, int b) {
  a = find_set(a);
  b = find_set(b);
  if (a != b) {
    if (rang[a] < rang[b]) swap(a, b);
    par[b] = a;
    sz[a] += sz[b];
    if (rang[a] == rang[b]) rang[a]++;
  }
}
bool used[NMAX];
int main() {
  srand((unsigned int)time(NULL));
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  make_set(n + 1);
  used[n + 1] = 1;
  cout << 1 << ' ';
  for (int i = 1; i <= n; i++) {
    make_set(i);
  }
  for (int i = 1; i <= n; i++) {
    int p;
    cin >> p;
    used[p] = 1;
    if (p > 1) {
      if (used[p - 1]) union_sets(p, p - 1);
    }
    if (used[p + 1]) union_sets(p, p + 1);
    cout << i + 2 - sz[find_set(n + 1)] << ' ';
  }
}
