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