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