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