#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e6+5;
ll h[N];
struct Node {
ll x,y;
};
vector<Node> vec;
int main() {
int n;
scanf("%d",&n);
for (int i = 1;i<= n;i++)
{
scanf("%lld",&h[i]);
h[i]-=i;
}
vec.push_back({h[1],1});
for (int i = 2;i<= n;i++) {
if (h[i] < vec.back().x) {
vec.push_back({h[i],i});
continue;
}
if (h[i] == vec.back().x) continue;
while (vec.size() > 1 && h[i]-vec.back().x > i - vec.back().y) {
h[i]-=i-vec.back().y;
vec.pop_back();
}
if (vec.size() == 1) {
ll tmp = (h[i] - vec.back().x) / i;
h[i] -= tmp*(i-1);
vec.back().x += tmp;
}
if (h[i] == vec.back().x) continue;
ll d = h[i] - vec.back().x;
Node tmpk = vec.back();
if (vec.size() == 1)
vec.back().x++;
else
vec.pop_back();
vec.push_back({tmpk.x,tmpk.y + d});
}
vec.push_back({0,n*10});
int p = 0;
for (int i = 1;i<= n;i++) {
if (vec[p+1].y == i)p++;
printf("%lld ",vec[p].x+i);
}
printf("\n");
return 0;
}