#include <bits/stdc++.h>
using namespace std;
long long n;
bool p[300005];
bool c[300005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  cout << "1 ";
  long long ans = 1;
  c[n + 1] = true;
  for (long long i = 1; i <= n; i++) {
    long long x;
    cin >> x;
    ans++;
    p[x] = true;
    if (c[x + 1] == true) {
      while (p[x] == true && x >= 1) {
        c[x] = true;
        ans--;
        x--;
      }
      cout << ans << " ";
      continue;
    }
    cout << ans << " ";
  }
  return 0;
}
