#include <bits/stdc++.h>
using namespace std;
vector<bool> mar;
vector<vector<pair<int, int>>> v;
void print(vector<int> v) {
  vector<int>::iterator it = v.begin();
  while (it != v.end()) {
    cout << *it << " ";
    it++;
  }
  cout << endl;
}
struct comp {
  bool operator()(const pair<int, int>& a, const pair<int, int>& b) const {
    if (a.first == b.first) return a.second > b.second;
    return a.first < b.first;
  }
};
int main() {
  int n;
  cin >> n;
  vector<int> ans;
  ans.push_back(1);
  vector<bool> vis(n + 1);
  int mx = n;
  vis[mx] = 1;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    vis[x] = 1;
    if (i == n) {
      ans.push_back(1);
      break;
    }
    if (x == mx) {
      mx--;
      while (vis[mx] != 0) {
        mx--;
      }
      ans.push_back(mx - n + i + 1);
    } else {
      ans.push_back(mx - n + i + 1);
    }
  }
  print(ans);
}
