#include <bits/stdc++.h>
using namespace std;
long long a[200000], b[200000];
int main() {
  ios_base::sync_with_stdio(0);
  long long n, mx = 0, i, kol = 1;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  for (i = n; i >= 1; i--) {
    b[kol] = max(0ll, mx - a[i] + 1);
    mx = max(mx, a[i]);
    kol++;
  }
  for (i = n; i >= 1; i--) cout << b[i] << ' ';
}
