#include <bits/stdc++.h>
using namespace std;
int a[300005];
int vis[300005];
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  int val = 1;
  int ch = n;
  cout << val << " ";
  while (n--) {
    int x;
    cin >> x;
    vis[x] = 1;
    if (x == ch) {
      ch--;
      while (ch > 0 && vis[ch]) {
        ch--;
        val--;
      }
      { cout << val << " "; }
    } else {
      val++;
      cout << val << " ";
    }
  }
  return 0;
}
