#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  int n, mx;
  cin >> n;
  int a[n], b[n];
  for (int i = 0; i < n; ++i) cin >> a[i];
  b[n - 1] = 0;
  mx = a[n - 1];
  for (int i = n - 2; i >= 0; --i) {
    mx = max(mx, a[i + 1]);
    if (mx >= a[i])
      b[i] = mx - a[i] + 1;
    else
      b[i] = 0;
  }
  for (int i = 0; i < n; ++i) cout << b[i] << " ";
  return 0;
}
