#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 10;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  int data[maxn];
  bool visit[maxn];
  memset(visit, false, sizeof(visit));
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> data[i];
  }
  int max_right = n;
  int cnt = 1;
  vector<int> p;
  p.push_back(cnt);
  for (int i = 1; i <= n; i++) {
    visit[data[i]] = true;
    if (data[i] == max_right) {
      for (int j = max_right - 1; j >= 1; j--) {
        if (visit[j] == true)
          cnt--;
        else {
          max_right = j;
          break;
        }
      }
    } else {
      cnt++;
    }
    p.push_back(cnt);
  }
  for (int i = 0; i < p.size(); i++) {
    cout << p[i] << " ";
  }
  cout << endl;
  return 0;
}
