#include <bits/stdc++.h>
using namespace std;
const int MAXN = 3 * 1e5;
int n, t[4 * MAXN];
void build(int a[], int v, int tl, int tr) {
  if (tl == tr)
    t[v] = a[tl];
  else {
    int tm = (tl + tr) / 2;
    build(a, v * 2, tl, tm);
    build(a, v * 2 + 1, tm + 1, tr);
    t[v] = t[v * 2] + t[v * 2 + 1];
  }
}
int sum(int v, int tl, int tr, int l, int r) {
  if (l > r) return 0;
  if (l == tl && r == tr) return t[v];
  int tm = (tl + tr) / 2;
  return sum(v * 2, tl, tm, l, min(r, tm)) +
         sum(v * 2 + 1, tm + 1, tr, max(l, tm + 1), r);
}
void update(int v, int tl, int tr, int pos, int new_val) {
  if (tl == tr)
    t[v] = new_val;
  else {
    int tm = (tl + tr) / 2;
    if (pos <= tm)
      update(v * 2, tl, tm, pos, new_val);
    else
      update(v * 2 + 1, tm + 1, tr, pos, new_val);
    t[v] = t[v * 2] + t[v * 2 + 1];
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  cout << 1 << ' ';
  int a[n];
  for (int i = 0; i < n; i++) {
    a[i] = 0;
  }
  build(a, 1, 0, n - 1);
  long long ans = 1;
  for (int i = 0; i < n; i++) {
    long long x;
    cin >> x;
    x--;
    update(1, 0, n - 1, x, 1);
    if (sum(1, 0, n - 1, x, n - 1) < n - x) {
      ans++;
      cout << ans << ' ';
    } else {
      long long l = -1, r = x;
      while (r - l > 1) {
        long long m = (r + l) / 2;
        if (sum(1, 0, n - 1, m, n - 1) < n - m) {
          l = m;
        } else {
          r = m;
        }
      }
      ans -= x - r;
      cout << ans << ' ';
    }
  }
}
