#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  cout.precision(3);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  vector<long long> b(n);
  long long res = 0;
  for (long long i = n - 1; i >= 0; i--) {
    b[i] = res - a[i] + 1;
    res = max(res, a[i]);
  }
  for (long long i : b) cout << max(0ll, i) << " ";
}
