#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, y = 0;
  cin >> n;
  long long a[n], b[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  b[n - 1] = 0;
  y = a[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    if (y == a[i]) {
      b[i] = 1;
    } else {
      y = max(y, a[i]);
      if (a[i] >= y) {
        b[i] = 0;
      } else
        b[i] = y - a[i] + 1;
    }
  }
  for (long long i = 0; i < n; i++) {
    cout << b[i] << " ";
  }
}
