#include <bits/stdc++.h>
using namespace std;
int main() {
  int m[100001], a[100001], n, t;
  cin >> n;
  for (int k = 1; k <= n; k++) cin >> a[k];
  t = a[n];
  for (int k = n - 1; k >= 1; k--) {
    if (a[k] <= t)
      m[k] = t - a[k] + 1;
    else {
      t = a[k];
      m[k] = 0;
    }
  }
  m[n] = 0;
  for (int k = 1; k <= n; k++) cout << m[k] << ' ';
  return 0;
}
