#include <bits/stdc++.h>
using namespace std;
int a[300005];
int main() {
  int n;
  cin >> n;
  int i;
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n)))
    cin >> a[i];
  cout << "1 ";
  int last = n;
  int ans = 1;
  map<int, int> sd;
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n))) {
    if (last == a[i]) {
      last--;
      while (sd[last] == 1) {
        last--;
        ans--;
      }
    } else {
      ans++;
    }
    sd[a[i]] = 1;
    cout << ans << " ";
  }
}
