#include <bits/stdc++.h>
using namespace std;
bool s[300300];
int res[300300];
int main() {
  int n, a;
  while (~scanf("%d", &n)) {
    int cmp = n;
    int ans = 0;
    res[0] = 0;
    memset(s, 0, sizeof(s));
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a);
      s[a] = 1;
      for (int j = cmp; j > 0; j--) {
        if (s[j])
          ans++, cmp--;
        else
          break;
      }
      res[i] = i - ans;
    }
    int p = 0;
    for (int i = 0; i <= n; i++) {
      if (p++) printf(" ");
      printf("%d", res[i] + 1);
    }
    printf("\n");
  }
  return 0;
}
