#include <bits/stdc++.h>
using namespace std;
long long n, arr[100005], Max, ans[100005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (long long i = (long long)(1); i <= (long long)(n); i++) cin >> arr[i];
  Max = arr[n];
  ans[n] = 0;
  for (long long i = (long long)(n - 1); i >= (long long)(1); i--) {
    if (arr[i] <= Max)
      ans[i] = Max - arr[i] + 1;
    else {
      Max = arr[i];
      ans[i] = 0;
    }
  }
  for (long long i = (long long)(1); i <= (long long)(n); i++)
    cout << ans[i] << " ";
  return 0;
}
