#include <bits/stdc++.h>
using namespace std;
struct debugger {
  static void call(string::iterator it, string::iterator ed) {}
  template <typename T, typename... aT>
  static void call(string::iterator it, string::iterator ed, T a, aT... rest) {
    string b;
    for (; *it != ','; ++it)
      if (*it != ' ') b += *it;
    cout << b << "=" << a << " ";
    call(++it, ed, rest...);
  }
};
long long arr[100005], nw[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < (int)(n); ++i) cin >> arr[i];
  nw[n - 1] = arr[n - 1];
  for (int i = (int)(n - 1); i >= (int)(0); --i) {
    nw[i] = max(nw[i + 1], arr[i + 1]);
  }
  for (int i = 0; i < (int)(n); ++i) {
    cout << max(nw[i] - arr[i] + 1, (long long)0) << " ";
  }
}
