#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b, mx = 0;
  cin >> n;
  int a[n + 1];
  vector<int> t;
  for (int k = 1; k <= n; k++) cin >> a[k];
  for (int k = n; k >= 1; k--) {
    t.push_back(max(0, mx - a[k] + 1));
    mx = max(a[k], mx);
  }
  for (int k = t.size() - 1; k >= 0; k--) {
    cout << t[k] << " ";
  }
}
