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