#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
template <class T>
bool ckmin(T& a, const T& b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int N = 3e5 + 20;
bool a[N];
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  cout << "1 ";
  for (int i = 1, r = n, cur = 2; i <= n; ++i, ++cur) {
    int p;
    cin >> p;
    a[p] = 1;
    while (r >= 0 && a[r]) --r, --cur;
    cout << cur << ' ';
  }
}
