#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const int maxn = 1e6 + 10;
const int maxv = 1e3 + 10;
const double eps = 1e-9;
inline int read() {
  char c = getchar();
  int f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  int x = 0;
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
int ans[maxn];
int a[maxn];
int main() {
  int n;
  cin >> n;
  int big = 0;
  for (int i = 1; i <= n; i++) cin >> a[i];
  big = a[n];
  for (int i = n - 1; i > 0; i--) {
    ans[i] = big - a[i] + 1;
    if (ans[i] < 0) ans[i] = 0;
    big = max(big, a[i]);
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << ' ';
  return 0;
}
