#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int N = 1e5;
const int MOD = 1e9 + 7;
const double PI = acos(-1);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int n, x;
  cin >> n;
  int cur = 1, right = n + 1;
  vector<int> a(n + 1, 0);
  vector<int> res;
  res.push_back(cur);
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x == right - 1) {
      right = x;
      for (int p = x - 1; p >= 1; p--) {
        if (!a[p])
          break;
        else {
          cur--;
          right--;
        }
      }
    } else {
      cur++;
    }
    a[x]++;
    res.push_back(cur);
  }
  for (int z : res) cout << z << ' ';
}
