#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long double pi = 3.1415926535;
long long num_generator() { return rand() % 1000; }
void array_generator(long long a[], long long n) {
  for (long long i = 0; i < n; i++) a[i] = rand() % 100;
}
void solve() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long b[n + 1];
  long long d = -1;
  for (long long i = n - 1; i >= 0; i--) {
    b[i] = max(d, a[i]);
    d = b[i];
  }
  b[n] = -1;
  for (long long i = 0; i < n; i++) {
    if (b[i + 1] < a[i] || b[i] == -1)
      cout << "0 ";
    else
      cout << b[i] - a[i] + 1 << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
