#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y);
long long mpower(long long x, long long y, long long p);
long long modInv(long long a, long long m);
long long gcdExtended(long long a, long long b, long long *x, long long *y);
long long get(long long x) {
  long long c = 0, p;
  while (x) {
    p = x % 10;
    c += p;
    x = x / 10;
  }
  return c;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t, i, j, k, l, p, q, x, y, z, a, b, c, d, f, n, m, M = 1000000007;
  unordered_map<long long, long long> N;
  string s;
  cin >> n;
  long long A[n];
  for (i = 0; i < n; i++) {
    cin >> A[i];
    A[i]--;
  }
  cout << 1 << " ";
  long long B[n];
  for (i = 0; i < n; i++) {
    B[i] = 0;
  }
  c = 1;
  for (i = 0; i < n; i++) {
    B[A[i]] = 1;
    if (A[i] == n - 1) {
      B[A[i]] = 2;
      j = A[i];
      if (j != 0) {
        while (B[j - 1] == 1) {
          c--;
          B[j - 1] = 2;
          j--;
          if (j == 0) {
            break;
          }
        }
      }
    } else if (B[A[i] + 1] == 2) {
      B[A[i]] = 2;
      j = A[i];
      if (j != 0) {
        while (B[j - 1] == 1) {
          c--;
          B[j - 1] = 2;
          j--;
          if (j == 0) {
            break;
          }
        }
      }
    } else {
      c++;
    }
    cout << c << " ";
  }
  return 0;
}
long long modInv(long long a, long long m) {
  long long x, y;
  long long g = gcdExtended(a, m, &x, &y);
  long long res = (x % m + m) % m;
  return res;
}
long long gcdExtended(long long a, long long b, long long *x, long long *y) {
  if (a == 0) {
    *x = 0, *y = 1;
    return b;
  }
  long long x1, y1;
  long long gcd = gcdExtended(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return gcd;
}
long long mpower(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) {
      res = (res * x) % p;
    }
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
