#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, a, r, c = 0;
  bool b[300000] = {};
  cin >> n;
  r = n - 1;
  cout << 1 << ' ';
  while (n--) {
    cin >> a;
    b[a - 1] = 1;
    c++;
    while (r >= 0 && b[r]) {
      r--;
      c--;
    }
    cout << c + 1 << ' ';
  }
  return 0;
}
