#include <bits/stdc++.h>
int main(int argc, char const *argv[]) {
  int n, i, max;
  scanf("%d", &n);
  int a[n];
  int r[n];
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  r[n - 1] = 0;
  max = a[n - 1];
  for (i = n - 2; i >= 0; i--) {
    if (a[i] <= max) {
      r[i] = max - a[i] + 1;
    } else {
      r[i] = 0;
      max = a[i];
    }
  }
  for (i = 0; i < n; i++) printf("%d ", r[i]);
  return 0;
}
