#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int a;
  cin >> a;
  long* x = new long[a];
  long* z = new long[a];
  long max = 0;
  for (long i = 0; i < a; i++) {
    cin >> z[i];
  }
  bool in = 0;
  for (long i = a - 1; i >= 0; i--) {
    if (max < z[i])
      max = z[i];
    else if (max == z[i])
      in = 1;
    if (z[i] != max)
      x[i] = max - z[i] + 1;
    else
      x[i] = max - z[i];
    if (in) {
      x[i] += 1;
      in = 0;
    }
  }
  cout << endl;
  for (long i = 0; i < a; i++) {
    cout << x[i] << " ";
  }
  return 0;
}
