#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long> a(n), res(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long mx = INT_MIN;
  for (int i = n - 1; i >= 0; i--) {
    res[i] = (mx >= a[i] ? mx - a[i] + 1 : 0);
    mx = max(mx, a[i]);
  }
  for (int i = 0; i < n; i++) {
    cout << res[i] << " ";
  }
}
