#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int INF = 0x7FFFFFFF;
const int MOD = 1e9 + 7;
const double EPS = 1e-10;
const double PI = 2 * acos(0.0);
const int maxn = 1e5 + 1666;
long long maxval[maxn << 2], mmax, aa[maxn], len;
void PushUp(int rt) { maxval[rt] = max(maxval[rt << 1], maxval[rt << 1 | 1]); }
void Build(int rt, int l, int r) {
  if (l == r) {
    scanf("%d", &maxval[rt]);
    aa[len] = maxval[rt];
    len++;
    return;
  }
  int m = (l + r) >> 1;
  Build(rt << 1, l, m);
  Build(rt << 1 | 1, m + 1, r);
  PushUp(rt);
}
void Query(int rt, int l, int r, int L, int R) {
  if (L <= l && r <= R) {
    mmax = max(mmax, maxval[rt]);
    return;
  }
  int m = (l + r) >> 1;
  if (L <= m) Query(rt << 1, l, m, L, R);
  if (R > m) Query(rt << 1 | 1, m + 1, r, L, R);
}
int main() {
  long long n;
  scanf("%I64d", &n);
  len = 1;
  Build(1, 1, n);
  for (long long i = 1; i <= n; i++) {
    mmax = -INF;
    Query(1, 1, n, i + 1, n);
    if (i != 1) printf(" ");
    if (aa[i] > mmax)
      printf("0");
    else
      printf("%I64d", mmax - aa[i] + 1);
  }
  return 0;
}
