#include <bits/stdc++.h>
using namespace std;
long long rint() {
  long long ret = 0, uu = 1;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-') uu = -1, c = getchar();
  while (isdigit(c)) ret = ret * 10 + (c - '0'), c = getchar();
  return ret * uu;
}
long long n, h[1000010], rest[1000010], pure, more;
vector<long long> st, sz;
bool check(long long step, long long st, long long pre) {
  if (pre == 0) {
    return true;
  }
  pure = step / pre, more = step % pre;
  if (more + st >= pre - 1) {
    pure++;
  }
  if (h[pre - 1] + pure + 2 > h[pre] - step) {
    return true;
  }
  return false;
}
int main() {
  long long i, l, r, mid, lst;
  n = rint();
  for (i = 0; i < n; i++) {
    h[i] = rint();
  }
  lst = -1;
  for (i = 0; i < n; i++) {
    l = 0;
    r = 1000000000000000000 + 1;
    while (l < r) {
      mid = (l + r) >> 1;
      if (check(mid, lst, i)) {
        r = mid;
      } else {
        l = mid + 1;
      }
    }
    check(l, lst, i);
    h[i] -= l;
    if (i > 0) {
      h[i - 1] += pure;
      lst = (lst + more) % i;
      if (h[i - 1] == h[i]) {
        lst = i - 1;
      } else if (lst == i - 1) {
        lst = -1;
      }
    }
  }
  for (i = n - 2; i >= 0; i--) {
    if (i == lst) {
      h[i] = h[i + 1];
    } else {
      h[i] = h[i + 1] - 1;
    }
  }
  for (i = 0; i < n; i++) {
    printf("%lld ", h[i]);
  }
  return 0;
}
