#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char ch = getchar();
  int x = 0, f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, a[300005], b[300005];
int main() {
  n = read();
  for (int i = 1; i <= n; ++i) a[i] = read();
  for (int i = n; i >= 1; --i) b[i] = max(b[i + 1], a[i]);
  for (int i = 1; i <= n; ++i) printf("%d ", i - n + b[i]);
  puts("1");
}
