#include <bits/stdc++.h>
using namespace std;
int n, mapa[1000000 + 100];
string str;
vector<int> v;
int main() {
  cin >> n;
  v.push_back(1);
  int cnt = 0;
  int levo = n;
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    cnt++;
    mapa[x] = 1;
    while (mapa[levo]) levo--, cnt--;
    v.push_back(cnt + 1);
  }
  for (int i = 0; i < v.size(); i++) cout << v[i] << ' ';
  return 0;
}
