#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
int a[maxn], b[maxn], c[maxn];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) scanf("%d", &a[i]);
  b[n + 1] = 0;
  for (int i = (n); i >= (1); i--) {
    if (a[i] > b[i + 1]) {
      b[i] = a[i];
    } else {
      b[i] = b[i + 1];
    }
  }
  for (int i = (n); i >= (1); i--) {
    if (a[i] == b[i]) {
      if (b[i] > b[i + 1])
        c[i] = 0;
      else
        c[i] = 1;
    } else
      c[i] = b[i] - a[i] + 1;
  }
  for (int i = (1); i <= (n); i++) printf("%d ", c[i]);
  return 0;
}
