#include <bits/stdc++.h>
using namespace std;
int getRoot(vector<int>& root, int ind) {
  if (ind != root[ind]) {
    root[ind] = getRoot(root, root[ind]);
  }
  return root[ind];
}
void setUnion(vector<int>& root, vector<int>& rank, vector<int>& count,
              int pos1, int pos2) {
  int root1 = getRoot(root, pos1);
  int root2 = getRoot(root, pos2);
  if (rank[root1] == rank[root2]) {
    root[root2] = root[root1];
    rank[root1]++;
    count[root1] += count[root2];
  } else if (rank[root1] > rank[root2]) {
    root[root2] = root[root1];
    count[root1] += count[root2];
  } else {
    root[root1] = root[root2];
    count[root2] += count[root1];
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> cur(n);
  fill(cur.begin(), cur.end(), 0);
  vector<int> root;
  for (int i = 0; i < n; i++) {
    root.push_back(i);
  }
  vector<int> rank(n);
  fill(rank.begin(), rank.end(), 0);
  vector<int> count(n);
  fill(count.begin(), count.end(), 1);
  vector<int> ans = {1};
  for (int i = 0; i < n; i++) {
    int pos;
    cin >> pos;
    cur[pos - 1] = 1;
    if (pos < n && cur[pos] == 1) {
      setUnion(root, rank, count, pos - 1, pos);
    }
    if (pos > 1 && cur[pos - 2] == 1) {
      setUnion(root, rank, count, pos - 1, pos - 2);
    }
    if (cur[n - 1] == 0) {
      ans.push_back(i + 1 + 1);
    } else {
      ans.push_back((i + 1) + 1 - count[getRoot(root, n - 1)]);
    }
  }
  for (auto a : ans) {
    cout << a << " ";
  }
}
