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