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