#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int main() {
  int arr[123456];
  int maxx[123456];
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }
  maxx[n] = 0;
  for (int i = n - 1; i >= 0; i--) {
    maxx[i] = max(maxx[i + 1], arr[i]);
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", maxx[i] - arr[i] + 1 - (arr[i] > maxx[i + 1]));
  }
}
