#include <bits/stdc++.h>
using namespace std;
int a[100005], ans[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  int tmp = 0;
  for (int i = n; i >= 1; --i) {
    ans[i] = max(tmp + 1 - a[i], 0);
    tmp = max(tmp, a[i]);
  }
  for (int i = 1; i <= n; ++i) printf("%d%c", ans[i], " \n"[n == i]);
}
