#include <bits/stdc++.h>
using namespace std;
int t[300100];
void add(int k) {
  for (; k <= 300000; k = (k | (k + 1))) t[k]++;
}
int sum(int k) {
  int ans = 0;
  for (; k >= 0; k = (k & (k + 1)) - 1) ans += t[k];
  return ans;
}
int sum(int l, int r) { return sum(r) - sum(l - 1); }
int main() {
  int n, i, x, ans = 1, res, l, r, m;
  scanf("%d", &n);
  printf("%d ", ans);
  for (i = 0; i < n; ++i) {
    scanf("%d", &x);
    add(x);
    if (sum(x, n) != n - x + 1) {
      ans++;
    } else {
      res = x;
      l = 1;
      r = x;
      while (l <= r) {
        m = (l + r) / 2;
        if (sum(m, x) == x - m + 1) {
          res = m;
          r = m - 1;
        } else
          l = m + 1;
      }
      ans -= (x - res);
    }
    printf("%d ", ans);
  }
  return 0;
}
