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