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