#include <bits/stdc++.h>
using namespace std;
static const int MAXN = 1e5 + 10;
int n;
int data[MAXN];
int tail[MAXN];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", data + i);
  }
  for (int i = n; i > 0; --i) {
    tail[i] = max(tail[i + 1], data[i + 1]);
  }
  for (int i = 1; i <= n; ++i) {
    printf("%d ", max(tail[i] + 1 - data[i], 0));
  }
}
