#include<bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
#define M 1000000007
#define L 1000000000
#define mp make_pair
#define eps 1e-12
#define int long long
#define float long double
#pragma GCC optimize("Ofast")
#pragma unroll
#pragma comment(linker, "/stack:200000000")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#define _CRT_SECURE_NO_WARNINGS

int a[2000010],b[2000110],c[2000010],z=0,d[2000110],w[2000110],mat[1001][1001],x,m,n;
set<int> depth;
long double an[100010],S,D,S1,S2,X,Y,tim,te=0,tt=0,tt1=0;
string st1[1000101],st,st2,st3;char str[1000001],ch,ch2,ch3,*si;
 int modulo(int a,int b=M-2,int n=M){
    int x=1,y=a;
    while(b > 0){
        if(b%2 == 1){
            x=(x*y)%n;
        }
        y = (y*y)%n; // squaring the base
        b /= 2;
    }
    return x%n;
}
set<pair<int,int> > bad;
vector<int> g[300001];
vector<int> h[100001];
pair<int,int> zero=mp(0,-1);
template<class T >
ostream& operator<<(ostream& o,vector<T> v)
{
for(T x : v)o<<x<<' ';
o<<endl;
return o;
}
template<class T ,class T1>
ostream& operator<<(ostream& o,map<T,T1> v)
{
for(auto x : v)o<<x.first<<' '<<x.second<<endl;
o<<endl;
return o;
}
template<class T >
ostream& operator<<(ostream& o,set<T> v)
{
for(T x : v)o<<x<<' ';
o<<endl;
return o;
}
template<typename T,typename T2>
auto find(T& v,T2 x)
{
return find(v.begin(),v.end(),x);
}
template<typename T,typename T2>
auto lower_bound(T& v,T2 x)
{
return lower_bound(v.begin(),v.end(),x);
}
template<typename T,typename T2>
auto upper_bound(T& v,T2 x)
{
return upper_bound(v.begin(),v.end(),x);
}
template<typename T,typename T2>
void sort(vector<T>& v,T2 x)
{
sort(v.begin(),v.end(),x);
}
template<typename T>
void sort(vector<T>& v)
{
sort(v.begin(),v.end());
}
template<class T >
ostream& operator<<(ostream& o,multiset<T> v)
{
for(T x : v)o<<x<<' ';
o<<endl;
return o;
}
template<class T,class T2 >
ostream& operator<<(ostream& o,pair<T,T2> v)
{
o<<v.first<<' '<<v.second<<endl;
return o;
}
template<class T1,class T2>
T2 min(T1 a,T2 b)
{
return min((T2)a,b);
}
template<class T1,class T2>
T2 max(T1 a,T2 b)
{
return max((T2)a,b);
}

int vis[100001]={0};

class UF    {
public:
    int *id, cnt, *sz;

	// Create an empty union find data structure with N isolated sets.
    UF(int N)   {
        cnt = N;
	id = new int[N];
	sz = new int[N];
        for(int i=0; i<N; i++)	{
            id[i] = i;
	    sz[i] = 1;
	}
    }
    ~UF()	{
	delete [] id;
	delete [] sz;
    }
	// Return the id of component corresponding to object p.
    int find(int p)	{
        int root = p;
        while (root != id[root])
            root = id[root];
        while (p != root) {
            int newp = id[p];
            id[p] = root;
            p = newp;
        }
        return root;
    }
	// Replace sets containing x and y with their union.
    void merge(int x, int y)	{
        int i = find(x);
        int j = find(y);
        if (i == j) return;

		// make smaller root point to larger one
        if   (sz[i] < sz[j])	{
		id[i] = j;
		sz[j] += sz[i];
	} else	{
		id[j] = i;
		sz[i] += sz[j];
	}
        cnt--;
    }
	// Are objects x and y in the same set?
    bool connected(int x, int y)    {
        return find(x) == find(y);
    }
	// Return the number of disjoint sets.
    int count() {
        return cnt;
    }

};

void treefy(int i)
{
for(int x:g[i])
g[x].erase(find(g[x].begin(),g[x].end(),i));
for(int x:g[i])
treefy(x);
}

void factorial(int *b,int* c,int x=100000)
{
b[0]=1;int i;
for(i=1;i<=x+5;i++)
b[i]=b[i-1]*i%M;
c[x+2]=modulo(b[x+2]);
for(i=x+1;i>-1;i--)
c[i]=c[i+1]*(i+1)%M;
}
int comb(int n,int r,int* b,int* c)
{
if(r>n)return 0;
return b[n]*c[n-r]%M*c[r]%M;
}

long double flor(long double x)
{
if(abs(x-round(x))<eps)
return round(x);
else return floor(x);
}
int ceil(int x,int y)
{
return x/y+(x%y!=0);
}
int rond(float x)
{
int y=round(x);
if(x-y>0&&x-y-0.5>-eps)
return y+1;
else return y;
}
bool prime(int n)
{
if(n==1)return 0;
for(int i=2;i*i<=n;i++)
if(n%i==0)return 0;
return 1;
}
using namespace __gnu_pbds;
typedef tree<int,null_type,less<int>,rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;

int32_t main()
{
    std::ios::sync_with_stdio(false);
cin.tie(NULL);
 int t,j,r,q,u,s1,s2,s3,bb,l,c1,v1,v2,z,c2,n1,nn,x1,hx,hy,tx,ty,n2, js,maxi,i,s,n3,R,mx,p,v,o,m1,t1,k1,k,k2,k3,N,T,y,x3,y3,sq,x2,y1,y2,p1,
q1,l1,r1,t2,l2,r2,ans1,z1;
T=1;
//cin>>T;
//factorial(b,c,3e5);
srand(time(NULL));
tim=clock();float ti=0;
N=T;
while(T--)
{
//cout<<"Case #"<<N-T<<": ";
cin>>n;
s=0;
for(i=0;i<n;i++)
cin>>a[i],s+=a[i];
//cout<<1<<endl;
m=ceil((2*s/(0.0L+n)-n+1)/2+eps);
set<int> left;
for(i=n-1;i>0;i--)
if(a[i]>=m+i)
a[i-1]+=a[i]-(m+i),a[i]=m+i;
else left.insert(i);
/*
for(i=0;i<n;i++)
cout<<a[i]<<' ';
cout<<endl;
*/
left.insert(0);
for(i=1;i<n;i++)
{
while(a[i]-a[i-1]>1)
{
auto it=left.lower_bound(i);
it--;j=*it;
a[j]++,a[i]--;
if(j>0)
left.erase(j);
if(j<i-1)
left.insert(j+1);
}
if(a[i]==a[i-1])left.insert(i);
}
for(i=0;i<n;i++)
cout<<a[i]<<' ';
cout<<endl;

f:;
}
cerr<<(clock()-tim)/CLOCKS_PER_SEC<<endl;
}


#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <algorithm>
#define ll	long long
#define pii	pair<int,int>
#define pll pair<ll, ll>
#define LINF 0x7fffffffffffffff
#define INF 0x7fffffff
using namespace std;

ll N, temp;
vector<ll> m;

int main(void) {
	//freopen("input.txt", "r", stdin);

	ios::sync_with_stdio(false);
	cin.tie(NULL), cout.tie(NULL);

	cin >> N;
	m.resize(N);

	ll sum = 0;
	for (ll i = 0; i < N; i++) {
		cin >> m[i];
		sum += m[i];
	}

	ll a = sum / N - (N - 1) / 2;
	m[1] = (m[1] + m[0]) - a;
	m[0] = a;
	for (ll i = 2; i < N; i++) {
		sum = m[i] + m[i - 1];
		if (sum / 2 < m[i - 2]) {
			m[i] = sum - (m[i - 2] + 1);
			m[i - 1] = m[i - 2] + 1;
		}
		else {
			m[i - 1] = sum / 2;
			m[i] = (sum + 1) / 2;
		}
	}

	ll reverse = 1;
	while (1) {
		ll isChanged = 0;
		if (reverse == 0) {
			for (ll i = 0; i < N - 1; i++) {
				ll sum = m[i] + m[i + 1];
				if (m[i] != sum / 2 || m[i + 1] != (sum + 1) / 2) {
					isChanged = 1;
				}
				m[i] = sum / 2;
				m[i + 1] = (sum + 1) / 2;
			}
		}
		else {
			for (ll i = N - 1; i > 0; i--) {
				ll sum = m[i] + m[i - 1];
				if (m[i - 1] != sum / 2 || m[i] != (sum + 1) / 2) {
					isChanged = 1;
				}
				m[i - 1] = sum / 2;
				m[i] = (sum + 1) / 2;
			}
		}
		if (isChanged == 0) {
			break;
		}
		reverse = !reverse;
	}

	for (ll i = 0; i < N; i++) {
		cout << m[i] << ' ';
	}

	return 0;
}


#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <algorithm>
#define ll	long long
#define pii	pair<int,int>
#define pll pair<ll, ll>
#define LINF 0x7fffffffffffffff
#define INF 0x7fffffff
using namespace std;

ll N, temp;
vector<ll> m;

int main(void) {
	//freopen("input.txt", "r", stdin);

	ios::sync_with_stdio(false);
	cin.tie(NULL), cout.tie(NULL);

	cin >> N;
	m.resize(N);
	for (ll i = 0; i < N; i++) {
		cin >> m[i];
	}

	ll reverse = 0;
	while (1) {
		ll isChanged = 0;
		if (reverse == 0) {
			for (ll i = 0; i < N - 1; i++) {
				ll sum = m[i] + m[i + 1];
				if (m[i] != sum / 2 || m[i + 1] != (sum + 1) / 2) {
					isChanged = 1;
				}
				m[i] = sum / 2;
				m[i + 1] = (sum + 1) / 2;
			}
		}
		else {
			for (ll i = N - 1; i > 0; i--) {
				ll sum = m[i] + m[i - 1];
				if (m[i - 1] != sum / 2 || m[i] != (sum + 1) / 2) {
					isChanged = 1;
				}
				m[i - 1] = sum / 2;
				m[i] = (sum + 1) / 2;
			}
		}
		if (isChanged == 0) {
			break;
		}
		reverse = !reverse;
	}

	for (ll i = 0; i < N; i++) {
		cout << m[i] << ' ';
	}

	return 0;
}


#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <algorithm>
#define ll	long long
#define pii	pair<int,int>
#define pll pair<ll, ll>
#define LINF 0x7fffffffffffffff
#define INF 0x7fffffff
using namespace std;

ll N, temp;
vector<ll> m;

int main(void) {
	//freopen("input.txt", "r", stdin);

	ios::sync_with_stdio(false);
	cin.tie(NULL), cout.tie(NULL);

	cin >> N;
	m.resize(N);

	ll sum = 0;
	for (ll i = 0; i < N; i++) {
		cin >> m[i];
		sum += m[i];
	}

	ll a = sum / N - (N - 1) / 2 + (sum % N != 0);
	m[1] = (m[1] + m[0]) - a;
	m[0] = a;
	for (ll i = 2; i < N; i++) {
		sum = m[i] + m[i - 1];
		if (sum / 2 < m[i - 2]) {
			m[i] = sum - (m[i - 2] + 1);
			m[i - 1] = m[i - 2] + 1;
		}
		else {
			m[i - 1] = sum / 2;
			m[i] = (sum + 1) / 2;
		}
	}

	ll reverse = 1;
	while (1) {
		ll isChanged = 0;
		if (reverse == 0) {
			for (ll i = 0; i < N - 1; i++) {
				ll sum = m[i] + m[i + 1];
				if (m[i] != sum / 2 || m[i + 1] != (sum + 1) / 2) {
					isChanged = 1;
				}
				m[i] = sum / 2;
				m[i + 1] = (sum + 1) / 2;
			}
		}
		else {
			for (ll i = N - 1; i > 0; i--) {
				ll sum = m[i] + m[i - 1];
				if (m[i - 1] != sum / 2 || m[i] != (sum + 1) / 2) {
					isChanged = 1;
				}
				m[i - 1] = sum / 2;
				m[i] = (sum + 1) / 2;
			}
		}
		if (isChanged == 0) {
			break;
		}
		reverse = !reverse;
	}

	for (ll i = 0; i < N; i++) {
		cout << m[i] << ' ';
	}

	return 0;
}


#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <algorithm>
#define ll	long long
#define pii	pair<int,int>
#define pll pair<ll, ll>
#define LINF 0x7fffffffffffffff
#define INF 0x7fffffff
using namespace std;

ll N, temp;
vector<ll> m;

int main(void) {
	//freopen("input.txt", "r", stdin);

	ios::sync_with_stdio(false);
	cin.tie(NULL), cout.tie(NULL);

	cin >> N;
	m.resize(N);

	ll sum = 0;
	for (ll i = 0; i < N; i++) {
		cin >> m[i];
		sum += m[i];
	}

	ll a = sum / N - (N - 1) / 2;
	m[1] = (m[1] + m[0]) - a;
	m[0] = a;
	for (ll i = 2; i < N; i++) {
		sum = m[i] + m[i - 1];
		if (sum / 2 < m[i - 1]) {
			m[i] = sum - (m[i - 2] + 1);
			m[i - 1] = m[i - 2] + 1;
		}
		else {
			m[i - 1] = sum / 2;
			m[i] = (sum + 1) / 2;
		}
	}

	ll reverse = 1;
	while (1) {
		ll isChanged = 0;
		if (reverse == 0) {
			for (ll i = 0; i < N - 1; i++) {
				ll sum = m[i] + m[i + 1];
				if (m[i] != sum / 2 || m[i + 1] != (sum + 1) / 2) {
					isChanged = 1;
				}
				m[i] = sum / 2;
				m[i + 1] = (sum + 1) / 2;
			}
		}
		else {
			for (ll i = N - 1; i > 0; i--) {
				ll sum = m[i] + m[i - 1];
				if (m[i - 1] != sum / 2 || m[i] != (sum + 1) / 2) {
					isChanged = 1;
				}
				m[i - 1] = sum / 2;
				m[i] = (sum + 1) / 2;
			}
		}
		if (isChanged == 0) {
			break;
		}
		reverse = !reverse;
	}

	for (ll i = 0; i < N; i++) {
		cout << m[i] << ' ';
	}

	return 0;
}


#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <algorithm>
#define ll	long long
#define pii	pair<int,int>
#define pll pair<ll, ll>
#define LINF 0x7fffffffffffffff
#define INF 0x7fffffff
using namespace std;

ll N, temp;
vector<ll> m, ans;

int main(void) {
	//freopen("input.txt", "r", stdin);

	ios::sync_with_stdio(false);
	cin.tie(NULL), cout.tie(NULL);

	cin >> N;
	m.resize(N);
	ans.resize(N);

	ll sum = 0;
	for (ll i = 0; i < N; i++) {
		cin >> m[i];
		sum += m[i];
		ans[i] = i;
	}

	for (ll i = 0; i < N; i++) {
		ans[i] += (sum - (N * (N - 1)) / 2) / N;
	}

	ll rest = (sum - (N * (N - 1)) / 2) % N;
	for (ll i = 0; i < N; i++) {
		if (rest == 0) {
			break;
		}
		ans[i]++;

		rest--;
	}

	for (ll i = 0; i < N; i++) {
		cout << ans[i] << ' ';
	}

	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#include <tuple>
#define mkp make_pair
#define mkt make_tuple
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define all(v) v.begin(),v.end()
using namespace std;
typedef long long ll;
const ll MOD=1e9+7;
template<class T> void chmin(T &a,const T &b){if(a>b) a=b;}
template<class T> void chmax(T &a,const T &b){if(a<b) a=b;}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int N;
  cin>>N;
  vector<ll> H(N);
  rep(i,N) cin>>H[i];

  vector<ll> D(N-1,0);
  for(int i=0;i+1<N;i++) D[i]=H[i+1]-H[i];

  vector<ll> num(N,0);
  while(true){
    bool all=true;
    for(int i=0;i<D.size();i++) if(D[i]>=2) all=false;
    if(all) break;

    for(int i=0;i<D.size();i++){
      if(D[i]<=1) continue;
      ll P=D[i]/2;
      num[i]+=P;
      num[i+1]-=P;
      D[i]%=2;
      if(i-1>=0) D[i-1]+=P;
      if(i+1<D.size()) D[i+1]+=P;
    }
  }

  vector<ll> ans=H;
  rep(i,N) ans[i]+=num[i];
  rep(i,N) cout<<ans[i]<<" ";
  cout<<endl;

  return 0;
}


#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#include <tuple>
#define mkp make_pair
#define mkt make_tuple
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define all(v) v.begin(),v.end()
using namespace std;
typedef long long ll;
const ll MOD=1e9+7;
template<class T> void chmin(T &a,const T &b){if(a>b) a=b;}
template<class T> void chmax(T &a,const T &b){if(a<b) a=b;}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int N;
  cin>>N;
  vector<ll> H(N);
  rep(i,N) cin>>H[i];

  if(N==1){
      cout<<H[0]<<endl;
      return 0;
  }

  vector<ll> D(N-1,0);
  for(int i=0;i+1<N;i++) D[i]=H[i+1]-H[i];

  vector<ll> num(N,0);
  set<pair<ll,int>> se;
  rep(i,N-1) se.insert(mkp(-D[i],i));
  while(true){
      auto itr=se.begin();
      int now=(*itr).second;

      ll P=D[now]/2;
      if(P==0) break;
      num[now]+=P;
      num[now+1]-=P;
      if(now-1>=0){
          se.erase(mkp(-D[now-1],now-1));
          D[now-1]+=P;
          se.insert(mkp(-D[now-1],now-1));
      }
      if(now+1<D.size()){
          se.erase(mkp(-D[now+1],now+1));
          D[now+1]+=P;
          se.insert(mkp(-D[now+1],now+1));
      }
      se.erase(itr);
      D[now]%=2;
      se.insert(mkp(-D[now],now));
  }

  vector<ll> ans=H;
  rep(i,N) ans[i]+=num[i];
  rep(i,N) cout<<ans[i]<<" ";
  cout<<endl;

  return 0;
}


#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#include <tuple>
#define mkp make_pair
#define mkt make_tuple
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define all(v) v.begin(),v.end()
using namespace std;
typedef long long ll;
const ll MOD=1e9+7;
template<class T> void chmin(T &a,const T &b){if(a>b) a=b;}
template<class T> void chmax(T &a,const T &b){if(a<b) a=b;}

const ll MAX=1e12;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int N;
  cin>>N;
  vector<ll> H(N);
  rep(i,N) cin>>H[i];

  ll sum=0;
  rep(i,N) sum+=H[i];

  ll ok=0,ng=MAX;
  while(abs(ok-ng)>1){
      ll mid=(ok+ng)/2;
      ll st=mid;
      ll ed=mid+N-1;
      if(N*(st+ed)/2<sum) ok=mid;
      else if((N-1)*(st+ed-1)/2+st>sum) ng=mid;
      else{
          ok=mid;
      }
  }

  vector<ll> ans(N,ok);
  ll st=ok;
  ll ed=st+N-1;
  ll rest=sum-((N-1)*(st+ed-1)/2+st);
  for(int i=1;i<N;i++){
      if(i==rest+1) ans[i]=ans[i-1];
      else ans[i]=ans[i-1]+1;
  }

  rep(i,N) cout<<ans[i]<<" ";
  cout<<endl;

  return 0;
}


#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#include <tuple>
#define mkp make_pair
#define mkt make_tuple
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define all(v) v.begin(),v.end()
using namespace std;
typedef long long ll;
const ll MOD=1e9+7;
template<class T> void chmin(T &a,const T &b){if(a>b) a=b;}
template<class T> void chmax(T &a,const T &b){if(a<b) a=b;}

const ll MAX=1e12;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int N;
  cin>>N;
  vector<ll> H(N);
  rep(i,N) cin>>H[i];

  ll sum=0;
  rep(i,N) sum+=H[i];

  ll ok=0,ng=MAX/N+10;
  while(abs(ok-ng)>1){
      ll mid=(ok+ng)/2;
      ll st=mid;
      ll ed=mid+N-1;
      if(N*(st+ed)/2<sum) ok=mid;
      else if((N-1)*(st+ed-1)/2+st>sum) ng=mid;
      else{
          ok=mid;
      }
  }

  vector<ll> ans(N,ok);
  ll st=ok;
  ll ed=st+N-1;
  ll rest=sum-((N-1)*(st+ed-1)/2+st);
  for(int i=1;i<N;i++){
      if(i==rest+1) ans[i]=ans[i-1];
      else ans[i]=ans[i-1]+1;
  }

  rep(i,N) cout<<ans[i]<<" ";
  cout<<endl;

  return 0;
}


#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;

typedef long long ll;

int main() {
    ll n, s = 0;
    cin >> n;
    vector<ll> h(n);
    rep(i, n) {
        cin >> h[i];
        s += h[i];
    }
    ll t = n * (n - 1) / 2;
    ll q = (s - t) / n;
    ll r = (s - t) % n;
    rep(i, n) {
        if (i < r) cout << q + i + 1;
        else cout << q + i;
        if (i == n - 1) cout << "\n";
        else cout << " ";
    }
}


#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

typedef long long ll;

int main() {
    int n;
    ll h, s = 0;
    cin >> n;
    rep(i, n) {
        cin >> h;
        s += h;
    }
    ll t = 1LL * n * (n - 1) / 2;
    ll q = (s - t) / n;
    ll r = (s - t) % n;
    rep(i, n) {
        if (i < r) cout << q + i + 1;
        else cout << q + i;
        if (i == n - 1) cout << "\n";
        else cout << " ";
    }
}


#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

typedef long long ll;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    ll h, s = 0;
    cin >> n;
    rep(i, n) {
        cin >> h;
        s += h;
    }
    ll t = 1LL * n * (n - 1) / 2;
    ll q = (s - t) / n;
    ll r = (s - t) % n;
    rep(i, n) {
        if (i < r) cout << q + i + 1;
        else cout << q + i;
        if (i == n - 1) cout << "\n";
        else cout << " ";
    }
}


/*
IIIT JABALPUR
*/
/*#pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC target("avx,avx2,fma")*/
#include<bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ordered_set tree<long long int, null_type,less<long long int>, rb_tree_tag,tree_order_statistics_node_update>
#define fastio ios_base::sync_with_stdio(0);cin.tie(NULL);
#define ll long long int
#define ld long double
#define mod 1000000007
#define mod1 998244353
#define ull unsigned long long
#define pb push_back
#define eb emplace_back
#define mk make_pair
#define mt make_tuple
#define pll pair < ll ,ll>
#define pii pair <int , int>
#define fi first
#define se second
#define inp(a,n) for(int i=0;i<n;i++)cin>>a[i]
#define inp1(a,n) for(int i=1;i<=n;i++)cin>>a[i]
#define vll vector<ll>
#define vpll vector<pll>
#define vpii vector<pii>
#define vii vector<int>
#define vbb vector<bool>
#define qll queue<ll>
#define qii queue<int>
#define sii set<int>
#define sll set<ll>
#define all(v) v.begin(),v.end()
#define lb lower_bound
#define ub upper_bound
#define reset(api) memset(api,0,sizeof(api))
#define mem(api) memset(api,-1,sizeof(api))
#define tcase int ttt; cin>>ttt; while(ttt--)
#define endl "\n"
const ll inf = 0x3f3f3f3f3f3f3f3fll;//4x10e18
const int INF = (int)1e9 + 43;
const int N = 1000005;
ll power(ll x, ll y, ll p) { ll res = 1; x = x % p; while (y > 0) { if (y & 1) res = (res * x) % p; y = y >> 1; x = (x * x) % p; } return res; }

ll a, sum;

int32_t main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	fastio
	int i, n;
	cin >> n;
	for (i = 1; i <= n; i++) {
		cin >> a;
		sum += a;
	}
	ll j = (sum - (n * (n - 1)) / 2) / n;
	ll rem = (sum - (n * (n - 1)) / 2) % n;
	for (i = 1; i <= n; i++) {
		a = (i - 1) + j + (rem ? 1 : 0);
		if (rem) {
			rem--;
		}
		cout << a << ' ';
	}
}


/*
IIIT JABALPUR
*/
/*#pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC target("avx,avx2,fma")*/
#include<bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ordered_set tree<long long int, null_type,less<long long int>, rb_tree_tag,tree_order_statistics_node_update>
#define fastio ios_base::sync_with_stdio(0);cin.tie(NULL);
#define ll long long int
#define ld long double
#define mod 1000000007
#define mod1 998244353
#define ull unsigned long long
#define pb push_back
#define eb emplace_back
#define mk make_pair
#define mt make_tuple
#define pll pair < ll ,ll>
#define pii pair <int , int>
#define fi first
#define se second
#define inp(a,n) for(int i=0;i<n;i++)cin>>a[i]
#define inp1(a,n) for(int i=1;i<=n;i++)cin>>a[i]
#define vll vector<ll>
#define vpll vector<pll>
#define vpii vector<pii>
#define vii vector<int>
#define vbb vector<bool>
#define qll queue<ll>
#define qii queue<int>
#define sii set<int>
#define sll set<ll>
#define all(v) v.begin(),v.end()
#define lb lower_bound
#define ub upper_bound
#define reset(api) memset(api,0,sizeof(api))
#define mem(api) memset(api,-1,sizeof(api))
#define tcase int ttt; cin>>ttt; while(ttt--)
#define endl "\n"
const ll inf = 0x3f3f3f3f3f3f3f3fll;//4x10e18
const int INF = (int)1e9 + 43;
const int N = 1000005;
ll power(ll x, ll y, ll p) { ll res = 1; x = x % p; while (y > 0) { if (y & 1) res = (res * x) % p; y = y >> 1; x = (x * x) % p; } return res; }

ll a, sum;

int32_t main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	fastio
	int n;
	cin >> n;
	int i;
	for (i = 1; i <= n; i++) {
		cin >> a;
		sum += a;
	}
	ll j = (sum - (n * (n - 1)) / 2) / n;
	ll rem = (sum - (n * (n - 1)) / 2) % n;
	for (i = 1; i <= n; i++) {
		a = (i - 1) + j + (rem ? 1 : 0);
		if (rem) {
			rem--;
		}
		cout << a << endl;
	}
}


/*
IIIT JABALPUR
*/
/*#pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC target("avx,avx2,fma")*/
#include<bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ordered_set tree<long long int, null_type,less<long long int>, rb_tree_tag,tree_order_statistics_node_update>
#define fastio ios_base::sync_with_stdio(0);cin.tie(NULL);
#define ll long long int
#define ld long double
#define mod 1000000007
#define mod1 998244353
#define ull unsigned long long
#define pb push_back
#define eb emplace_back
#define mk make_pair
#define mt make_tuple
#define pll pair < ll ,ll>
#define pii pair <int , int>
#define fi first
#define se second
#define inp(a,n) for(int i=0;i<n;i++)cin>>a[i]
#define inp1(a,n) for(int i=1;i<=n;i++)cin>>a[i]
#define vll vector<ll>
#define vpll vector<pll>
#define vpii vector<pii>
#define vii vector<int>
#define vbb vector<bool>
#define qll queue<ll>
#define qii queue<int>
#define sii set<int>
#define sll set<ll>
#define all(v) v.begin(),v.end()
#define lb lower_bound
#define ub upper_bound
#define reset(api) memset(api,0,sizeof(api))
#define mem(api) memset(api,-1,sizeof(api))
#define tcase int ttt; cin>>ttt; while(ttt--)
#define endl "\n"
const ll inf = 0x3f3f3f3f3f3f3f3fll;//4x10e18
const int INF = (int)1e9 + 43;
const int N = 1000005;
ll power(ll x, ll y, ll p) { ll res = 1; x = x % p; while (y > 0) { if (y & 1) res = (res * x) % p; y = y >> 1; x = (x * x) % p; } return res; }

ll a, sum;

int32_t main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	fastio
	ll i, n;
	cin >> n;
	for (i = 1; i <= n; i++) {
		cin >> a;
		sum += a;
	}
	ll j = (sum - (n * (n - 1)) / 2) / n;
	ll rem = (sum - (n * (n - 1)) / 2) % n;
	for (i = 1; i <= n; i++) {
		a = (i - 1) + j + (rem ? 1 : 0);
		if (rem) {
			rem--;
		}
		cout << a << ' ';
	}
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back

// bool sortbysec(const pair<int,int> &a,const pair<int,int> &b) {
//     return (a.second < b.second);
// }

int main() {
    //ll t;
    // cin>>t;
    // while(t--) {
        ll n;
        cin>>n;
        ll sum=0;
        for(ll i=0;i<n;i++) {
            ll x;
            cin>>x;
            sum+=x;
        }
        vector<ll> v(n,0);
        for(ll i=1;i<n;i++)
        v[i]=v[i-1]+1;

        ll q=(sum-(n*(n-1))/2)/n;
        ll qe=sum-(n*(n-1))/2;
        // cout<<n<<" hey"<<endl;
        // cout<<q<<" tea"<<endl;
        for(ll i=0;i<n;i++) {
            v[i]+=q;
            // cout<<v[i]<<" tea"<<endl;
            if(i<(qe%n))
            v[i]++;

            cout<<v[i]<<" ";
        }
        cout<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back

int main() {
    fastio;
    ll n;
    cin>>n;
    ll sum=0;
    for(ll i=0;i<n;i++) {
        ll x;
        cin>>x;
        sum+=x;
    }

    ll q=(sum-(n*(n-1))/2)/n;
    ll qe=sum-(n*(n-1))/2;

    for(ll i=0;i<n;i++) {
        ll x=0;
        x+=(q+i);

        if(i<(qe%n))
        x++;

        cout<<x<<" ";
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back

// bool sortbysec(const pair<int,int> &a,const pair<int,int> &b) {
//     return (a.second < b.second);
// }

int main() {
    //ll t;
    // cin>>t;
    // while(t--) {
        ll n;
        cin>>n;
        ll sum=0;
        for(ll i=0;i<n;i++) {
            ll x;
            cin>>x;
            sum+=x;
        }
        vector<ll> v(n,1);
        for(ll i=1;i<n;i++)
        v[i]=v[i-1]+1;

        ll q=(sum-(n*(n-1))/2)/(n+1);
        ll qe=sum-(n*(n-1))/2;
        // cout<<n<<" hey"<<endl;
        // cout<<q<<" tea"<<endl;
        for(ll i=0;i<n;i++) {
            v[i]+=q;
            // cout<<v[i]<<" tea"<<endl;
            if(i<(qe%n))
            v[i]++;

            cout<<v[i]<<" ";
        }
        cout<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back

// bool sortbysec(const pair<int,int> &a,const pair<int,int> &b) {
//     return (a.second < b.second);
// }

int main() {
    //ll t;
    // cin>>t;
    // while(t--) {
        ll n;
        cin>>n;
        ll sum=0;
        for(ll i=0;i<n;i++) {
            ll x;
            cin>>x;
            sum+=x;
        }

        ll q=(sum-(n*(n-1))/2)/n;
        ll qe=sum-(n*(n-1))/2;
        // cout<<n<<" hey"<<endl;
        // cout<<q<<" tea"<<endl;
        for(ll i=0;i<n;i++) {
            ll x=0;
            x+=(q+i);
            // cout<<v[i]<<" tea"<<endl;
            if(i<(qe%n))
            x++;

            cout<<x<<" ";
        }
        cout<<endl;

    return 0;
}


#include<bits/stdc++.h>
#define ll long long int
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL)
#define test(t) int t; cin >> t; while(t--)
#define endl "\n"
#define debug(x) cout << x << "\n"
#define pb push_back
#define mp make_pair
#define MEMS(x,t) memset(x, t, sizeof(x))
#define mod 1000000007
#define forn(i,n) for (ll i = 0; i < n; i++)
#define rep(i,a,b) for(int i = a; i <= b; i++)
#define rrep(i,a,b) for( int i = a; i >= b; i--)
#define map map<ll,ll>
#define fi first
#define se second
#define set set<ll>
#define pp pair<ll,ll>
using namespace std;
bool sortbysec(const pp &a,
              const pp &b)
{
    return (a.second < b.second);
}
int main()
{
    ll n;
    cin >> n;
    ll arr[n];
    ll x = 0;
    forn(i,n) cin >> arr[i], x += arr[i];
    if ( n == 1) cout << arr[0];
    else
    {
        ll a;
        ll s1 = (n*(n-1))/2;
        ll s2 = ((n - 1)*(n - 2))/2;
        if ( (x - s1)%n == 0 )
        {
            a = (x - s1)/n;
            forn(i,n) cout << a++ << " ";
        }
        else
        {
            a = (x - s2)/n;
            cout << a << " ";
            forn(i , n -1) cout << a++ << " ";
        }
    }

}


#include<bits/stdc++.h>
#define ll long long int
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL)
#define test(t) int t; cin >> t; while(t--)
#define endl "\n"
#define debug(x) cout << x << "\n"
#define pb push_back
#define mp make_pair
#define MEMS(x,t) memset(x, t, sizeof(x))
#define mod 1000000007
#define forn(i,n) for (ll i = 0; i < n; i++)
#define rep(i,a,b) for(int i = a; i <= b; i++)
#define rrep(i,a,b) for( int i = a; i >= b; i--)
#define map map<ll,ll>
#define fi first
#define se second
#define set set<ll>
#define pp pair<ll,ll>
using namespace std;
bool sortbysec(const pp &a,
              const pp &b)
{
    return (a.second < b.second);
}
int main()
{
    fastio;
    ll n;
    cin >> n;
    ll arr[n];
    ll x = 0;
    forn(i,n) cin >> arr[i], x += arr[i], arr[i] = i;
    if ( n == 1) cout << arr[0];
    else
    {
        ll temp;
        ll s1 = (n*(n-1))/2;
        ll index;
        temp = (x - s1)/n;
        index = (x - s1)%n;
        forn(i,n)
        {
            arr[i] += temp;
            if ( i < index) arr[i]++;
            cout << arr[i] << " ";
        }
    }

}


#include<bits/stdc++.h>
#define ll long long int
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL)
#define test(t) int t; cin >> t; while(t--)
#define endl "\n"
#define debug(x) cout << x << "\n"
#define pb push_back
#define mp make_pair
#define MEMS(x,t) memset(x, t, sizeof(x))
#define mod 1000000007
#define forn(i,n) for (ll i = 0; i < n; i++)
#define rep(i,a,b) for(int i = a; i <= b; i++)
#define rrep(i,a,b) for( int i = a; i >= b; i--)
#define map map<ll,ll>
#define fi first
#define se second
#define set set<ll>
#define pp pair<ll,ll>
using namespace std;
bool sortbysec(const pp &a,
              const pp &b)
{
    return (a.second < b.second);
}
int main()
{
    ll n;
    cin >> n;
    ll arr[n];
    ll x = 0;
    forn(i,n) cin >> arr[i], x += arr[i], arr[i] = i;
    if ( n == 1) cout << arr[0];
    else
    {
        ll temp;
        ll s1 = (n*(n-1))/2;
        ll index;
        temp = (x - s1)/n;
        index = (x - s1)%n;
        forn(i,n)
        {
            arr[i] += temp;
            if ( i < index) arr[i]++;
            cout << arr[i] << " ";
        }
    }

}


#include<bits/stdc++.h>
#define ll long long int
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL)
#define test(t) int t; cin >> t; while(t--)
#define endl "\n"
#define debug(x) cout << x << "\n"
#define pb push_back
#define mp make_pair
#define MEMS(x,t) memset(x, t, sizeof(x))
#define mod 1000000007
#define forn(i,n) for (ll i = 0; i < n; i++)
#define rep(i,a,b) for(int i = a; i <= b; i++)
#define rrep(i,a,b) for( int i = a; i >= b; i--)
#define map map<ll,ll>
#define fi first
#define se second
#define set set<ll>
#define pp pair<ll,ll>
using namespace std;
bool sortbysec(const pp &a,
              const pp &b)
{
    return (a.second < b.second);
}
int main()
{
    ll n;
    cin >> n;
    ll arr[n];
    ll x = 0;
    forn(i,n) cin >> arr[i], x += arr[i], arr[i] = i;

    if ( n == 1) cout << arr[0];
    else
    {
        ll temp;
        ll s1 = (n*(n-1))/2;
        ll index;
        // ll s2 = ((n - 1)*(n - 2))/2;
        temp = (x - s1)/n;
        forn(i,n) arr[i] += temp;
        index = (x - s1)%n;
        for ( ll i = 0; i < index; i++)
        {
            arr[i]++;
        }
        forn(i,n) cout << arr[i] << " ";
    }

}


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;

typedef unsigned long long ull;

ull n;
ull glo;
ull a[1048576];

ull sumTo(ull k){
    return ((k*(k+1))>>1ll);
}

ull sumBet(ull k1, ull k2){
    return (sumTo(k2) - sumTo(k1-1ll));
}

int main(){
    ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
    cin>>n;
    for(int i=0;i<n;++i){
        cin>>a[i];
        glo += a[i];
    }
    if(n == 1){
        cout<<a[0]<<'\n';
        return 0;
    }
    ull l1 = 0ll, r1 = n - 1ll;
    ull l2 = (glo/n) , r2 = l2 + n - 1ll;
    ull ml = (l1 + l2)>>(1ll);
    ull mr = (r1 + r2)>>(1ll);
    ull curr = sumBet(ml, mr);
    while(curr < glo){
        ml = (l1 + l2)>>(1ll);
        mr = (r1 + r2)>>(1ll);
        ull curr = sumBet(ml, mr);
        if(glo < curr) {
            if(r2 == mr && l2 == ml)
                break;
            r2 = mr;
            l2 = ml;
        } else if(glo > curr) {
            if(r1 == mr + 1ll && l2 == ml + 1ll)
                break;
            r1 = mr + 1ll;
            l1 = ml + 1ll;
        }
        else break;
    }

    -- ml, -- mr;
    curr = sumBet(ml, mr);
    for(ull i=0;i<n;++i){
        a[i] = ml+i;
        if(curr < glo){
            ++ a[i];
        }
        ++ curr;
    }
    cout<<a[0];
    for(int i=1;i<n;++i){
        cout<<' '<<a[i];
    }
    cout<<'\n';
    return 0;
}


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;

typedef unsigned long long ull;

int n;
ull glo;
ull a[1048576];

ull sumTo(ull k){
    return ((k*(k+1))>>1ll);
}

ull sumBet(ull k1, ull k2){
    return (sumTo(k2) - sumTo(k1-1ll));
}

int main(){
    ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
    cin>>n;
    for(int i=0;i<n;++i){
        cin>>a[i];
        glo += a[i];
    }
    if(n == 1){
        cout<<a[0]<<'\n';
        return 0;
    }
    ull l1 = 0, r1 = n-1;
    ull l2 = (glo/n) , r2 = l2 + n-1;
    ull ml = (l1 + l2)>>(1ll);
    ull mr = (r1 + r2)>>(1ll);
    ull curr = sumBet(ml, mr);
    while(curr < glo){
        ml = (l1 + l2)>>(1ll);
        mr = (r1 + r2)>>(1ll);
        ull curr = sumBet(ml, mr);
        if(glo < curr) {
            if(r2 == mr && l2 == ml)
                break;
            r2 = mr;
            l2 = ml;
        } else if(glo > curr) {
            if(r1 == mr + 1ll && l2 == ml + 1ll)
                break;
            r1 = mr + 1;
            l1 = ml + 1;
        }
        else break;
    }

    --ml, -- mr;
    curr = sumBet(ml, mr);
    for(ull i=0;i<n;++i){
        a[i] = ml+i;
        if(curr < glo){
            ++ a[i];
        }
        ++ curr;
    }
    cout<<a[0];
    for(int i=1;i<n;++i){
        cout<<' '<<a[i];
    }
    cout<<'\n';
    return 0;
}


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;

typedef unsigned long long ull;

ull n;
ull glo;
ull a[1048576];

ull sumBet(ull k1, ull k2){
    if((k1 + k2)&1ll)
        return ((k2 - k1 + 1ll)>>1ll)*(k1 + k2);

    return ((k1 + k2)>>1ll)*(k2 - k1 + 1ll);
}

int main(){
    ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
    cin>>n;
    for(ull i=0ll;i<n;++i){
        cin>>a[i];
        glo += a[i];
    }
    if(n == 1ll){
        cout<<a[0]<<'\n';
        return 0;
    }
    ull l1 = 0ll, r1 = n - 1ll;
    ull l2 = (glo/n) , r2 = l2 + n - 1ll;
    ull ml = (l1 + l2)>>(1ll);
    ull mr = (r1 + r2)>>(1ll);
    ull curr = sumBet(ml, mr);
    while(curr < glo){
        ml = (l1 + l2)>>(1ll);
        mr = (r1 + r2)>>(1ll);
        ull curr = sumBet(ml, mr);
        if(glo < curr) {
            if(r2 == mr && l2 == ml)
                break;
            r2 = mr;
            l2 = ml;
        } else if(glo > curr) {
            if(r1 == mr + 1ll && l2 == ml + 1ll)
                break;
            r1 = mr + 1ll;
            l1 = ml + 1ll;
        }
        else break;
    }

    -- ml, -- mr;
    curr = sumBet(ml, mr);
    for(ull i=0ll ;i<n;++i){
        a[i] = ml+i;
        if(curr < glo){
            ++ a[i];
        }
        ++ curr;
    }
    cout<<a[0];
    for(ull i=1ll;i<n;++i){
        cout<<' '<<a[i];
    }
    cout<<'\n';
    return 0;
}


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;

typedef unsigned long long ull;

int n;
ull glo;
ull a[1048576];

ull sumTo(ull k){
    return ((k*(k+1))>>1);
}

ull sumBet(ull k1, ull k2){
    return (sumTo(k2) - sumTo(k1-1ll));
}

int main(){
    ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
    cin>>n;
    for(int i=0;i<n;++i){
        cin>>a[i];
        glo += a[i];
    }
    ull l1 = 0, r1 = n-1;
    ull l2 = (glo/n) , r2 = l2 + n-1;
    ull ml = (l1 + l2)>>1;
    ull mr = (r1 + r2)>>1;
    ull curr = sumBet(ml, mr);
    while(curr < glo){
        ml = (l1 + l2)>>1;
        mr = (r1 + r2)>>1;
        ull curr = sumBet(ml, mr);
        if(glo < curr) {
            if(r2 == mr && l2 == ml)
                break;
            r2 = mr;
            l2 = ml;
        } else if(glo > curr) {
            if(r1 == mr + 1 && l2 == ml + 1)
                break;
            r1 = mr + 1;
            l1 = ml + 1;
        }
        else break;
    }

    --ml, -- mr;
    curr = sumBet(ml, mr);
    for(int i=0;i<n;++i){
        a[i] = ml+i;
        if(curr < glo){
            ++ a[i];
        }
        ++ curr;
    }
    cout<<a[0];
    for(int i=1;i<n;++i){
        cout<<' '<<a[i];
    }
    cout<<'\n';
    return 0;
}


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;

typedef unsigned long long ull;

int n;
ull glo;
ull a[1048576];

ull sumTo(ull k){
    return ((k*(k+1))>>1);
}

ull sumBet(ull k1, ull k2){
    return (sumTo(k2) - sumTo(k1-1ll));
}

int main(){
    ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
    cin>>n;
    for(int i=0;i<n;++i){
        cin>>a[i];
        glo += a[i];
    }
    if(n == 1){
        cout<<a[0]<<'\n';
        return 0;
    }
    ull l1 = 0, r1 = n-1;
    ull l2 = (glo/n) , r2 = l2 + n-1;
    ull ml = (l1 + l2)>>1;
    ull mr = (r1 + r2)>>1;
    ull curr = sumBet(ml, mr);
    while(curr < glo){
        ml = (l1 + l2)>>1;
        mr = (r1 + r2)>>1;
        ull curr = sumBet(ml, mr);
        if(glo < curr) {
            if(r2 == mr && l2 == ml)
                break;
            r2 = mr;
            l2 = ml;
        } else if(glo > curr) {
            if(r1 == mr + 1 && l2 == ml + 1)
                break;
            r1 = mr + 1;
            l1 = ml + 1;
        }
        else break;
    }

    --ml, -- mr;
    curr = sumBet(ml, mr);
    for(int i=0;i<n;++i){
        a[i] = ml+i;
        if(curr < glo){
            ++ a[i];
        }
        ++ curr;
    }
    cout<<a[0];
    for(int i=1;i<n;++i){
        cout<<' '<<a[i];
    }
    cout<<'\n';
    return 0;
}


#include <bits/stdc++.h>
#ifdef JOON
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define debug(...) 42
#endif
using namespace std;

int n;
long long a[1000003];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i];
		a[i] -= i;
	}
	long long ofs = a[0];
	vector<int> v, s;
	vector<long long> ps;
	v.push_back(1);
	s.push_back(0);
	s.push_back(1);
	ps.push_back(0LL);
	ps.push_back(0LL);
	for (int i = 1; i < n; i++) {
		int h = (int)v.size();
		v.push_back(1);
		s.push_back(s.back() + 1);
		ps.push_back(ps.back() + h);
		long long diff = a[i] - ofs + h;
		debug("DIFF %lld %lld\n", diff, ps.back());
		assert(diff >= 0);
		if (ps.back() <= diff) {
			long long lft = diff - ps.back();
			int r = lft % s.back();
			debug("FUCK %lld %zu\n", lft, v.size());
			ofs += lft / s.back() + (r == 0 ? 0 : 1);
			v.clear();
			s = {0};
			ps = {0LL};
			if (r) {
				v.push_back(r);
				s.push_back(s.back() + r);
				ps.push_back(0LL);
			}
			v.push_back(i - r + 1);
			s.push_back(s.back() + i - r + 1);
			ps.push_back(ps.back() + (i - r + 1) * ((int)v.size() - 1));
		} else {
			int l = 0, r = (int)v.size() + 1;
			long long ld = 0LL;
			while (l + 1 < r) {
				int mid = (l + r) / 2;
				long long req = ps.back() - ps[mid] - 1LL * (s.back() - s[mid]) * mid;
				if (req > diff) {
					l = mid;
				} else r = mid;
			}
			ld = (ps.back() - ps[l] - 1LL * (s.back() - s[l]) * l) - diff;
			int nl = s.back() - s[l] - ld;
			v.resize(l);
			s.resize(l + 1);
			ps.resize(l + 1);
			v.push_back(nl);
			s.push_back(s.back() + nl);
			ps.push_back(ps.back() + 1LL * nl * l);
			if (ld) {
				v.push_back(ld);
				s.push_back(s.back() + ld);
				ps.push_back(ps.back() + 1LL * ld * (l + 1));
			}
		}
		for (int i = 0; i < (int)v.size(); i++) {
			if (i) debug(" ");
			debug("%d", v[i]);
		}
		debug("\n");
		for (int i = 0; i <= (int)v.size(); i++) {
			if (i) debug(" ");
			debug("%lld", ps[i]);
		}
		debug("\n");
		debug("OFS %lld\n", ofs);
	}
	vector<long long> res;
	for (int i = 0; i < (int)v.size(); i++) {
		debug("%d\n", v[i]);
		for (int j = 0; j < v[i]; j++) {
			res.push_back(ofs - i);
		}
	}
	for (int i = 0; i < n; i++) {
		if (i) cout << " ";
		cout << res[i] + i;
	}
	return 0;
}


#include <bits/stdc++.h>
#ifdef JOON
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define debug(...) 42
#endif
using namespace std;

int n;
long long a[1000003];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i];
		a[i] -= i;
	}
	long long ofs = a[0];
	vector<int> v, s;
	vector<long long> ps;
	v.push_back(1);
	s.push_back(0);
	s.push_back(1);
	ps.push_back(0LL);
	ps.push_back(0LL);
	for (int i = 1; i < n; i++) {
		int h = (int)v.size();
		v.push_back(1);
		s.push_back(s.back() + 1);
		ps.push_back(ps.back() + h);
		long long diff = a[i] - ofs + h;
		debug("DIFF %lld %lld\n", diff, ps.back());
		assert(diff >= 0);
		if (ps.back() <= diff) {
			long long lft = diff - ps.back();
			int r = lft % v.size();
			ofs += lft / v.size() + (r == 0 ? 0 : 1);
			v.clear();
			s = {0};
			ps = {0LL};
			if (r) {
				v.push_back(r);
				s.push_back(s.back() + r);
				ps.push_back(0LL);
			}
			v.push_back(i - r + 1);
			s.push_back(s.back() + i - r + 1);
			ps.push_back(ps.back() + (i - r + 1) * ((int)v.size() - 1));
		} else {
			int l = 0, r = (int)v.size() + 1;
			long long ld = 0LL;
			while (l + 1 < r) {
				int mid = (l + r) / 2;
				long long req = ps.back() - ps[mid] - 1LL * (s.back() - s[mid]) * mid;
				if (req > diff) {
					l = mid;
					ld = req - diff;
				} else r = mid;
			}
			int nl = s.back() - s[l] - ld;
			v.resize(l);
			s.resize(l + 1);
			ps.resize(l + 1);
			v.push_back(nl);
			s.push_back(s.back() + nl);
			ps.push_back(ps.back() + 1LL * nl * l);
			if (ld) {
				v.push_back(ld);
				s.push_back(s.back() + ld);
				ps.push_back(ps.back() + 1LL * ld * (l + 1));
			}
		}
		for (int i = 0; i < (int)v.size(); i++) {
			if (i) debug(" ");
			debug("%d", v[i]);
		}
		debug("\n");
		for (int i = 0; i <= (int)v.size(); i++) {
			if (i) debug(" ");
			debug("%lld", ps[i]);
		}
		debug("\n");
		debug("OFS %lld\n", ofs);
	}
	vector<long long> res;
	for (int i = 0; i < (int)v.size(); i++) {
		debug("%d\n", v[i]);
		for (int j = 0; j < v[i]; j++) {
			res.push_back(ofs - i);
		}
	}
	for (int i = 0; i < n; i++) {
		if (i) cout << " ";
		cout << res[i] + i;
	}
	return 0;
}


#include <bits/stdc++.h>
#ifdef JOON
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define debug(...) 42
#endif
using namespace std;

int n;
long long a[1000003];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i];
		a[i] -= i;
	}
	long long ofs = a[0];
	vector<int> v, s;
	vector<long long> ps;
	v.push_back(1);
	s.push_back(0);
	s.push_back(1);
	ps.push_back(0LL);
	ps.push_back(0LL);
	for (int i = 1; i < n; i++) {
		int h = (int)v.size();
		v.push_back(1);
		s.push_back(s.back() + 1);
		ps.push_back(ps.back() + h);
		long long diff = a[i] - ofs + h;
		debug("DIFF %lld %lld\n", diff, ps.back());
		assert(diff >= 0);
		if (ps.back() <= diff) {
			long long lft = diff - ps.back();
			int r = lft % v.size();
			ofs += lft / v.size() + (r == 0 ? 0 : 1);
			v.clear();
			s = {0};
			ps = {0LL};
			if (r) {
				v.push_back(r);
				s.push_back(s.back() + r);
				ps.push_back(0LL);
			}
			v.push_back(i - r + 1);
			s.push_back(s.back() + i - r + 1);
			ps.push_back(ps.back() + (i - r + 1) * ((int)v.size() - 1));
		} else {
			int l = 0, r = (int)v.size() + 1;
			long long ld = 0LL;
			while (l + 1 < r) {
				int mid = (l + r) / 2;
				long long req = ps.back() - ps[mid] - 1LL * (s.back() - s[mid]) * mid;
				if (req > diff) {
					l = mid;
				} else r = mid;
			}
			ld = (ps.back() - ps[l] - 1LL * (s.back() - s[l]) * l) - diff;
			int nl = s.back() - s[l] - ld;
			v.resize(l);
			s.resize(l + 1);
			ps.resize(l + 1);
			v.push_back(nl);
			s.push_back(s.back() + nl);
			ps.push_back(ps.back() + 1LL * nl * l);
			if (ld) {
				v.push_back(ld);
				s.push_back(s.back() + ld);
				ps.push_back(ps.back() + 1LL * ld * (l + 1));
			}
		}
		for (int i = 0; i < (int)v.size(); i++) {
			if (i) debug(" ");
			debug("%d", v[i]);
		}
		debug("\n");
		for (int i = 0; i <= (int)v.size(); i++) {
			if (i) debug(" ");
			debug("%lld", ps[i]);
		}
		debug("\n");
		debug("OFS %lld\n", ofs);
	}
	vector<long long> res;
	for (int i = 0; i < (int)v.size(); i++) {
		debug("%d\n", v[i]);
		for (int j = 0; j < v[i]; j++) {
			res.push_back(ofs - i);
		}
	}
	for (int i = 0; i < n; i++) {
		if (i) cout << " ";
		cout << res[i] + i;
	}
	return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
using namespace std;
using namespace __gnu_cxx;
using namespace __gnu_pbds;

typedef long long         ll;
typedef pair<int, int>    pii;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define read        freopen("in.txt", "r", stdin)
#define write       freopen("out.txt", "w", stdout)
#define all(a)      a.begin(), a.end()
#define ff          first
#define ss          second
#define pb          push_back
#define eps         1e-9
#define inf         (1000000000)
#define infl        (1000000000000000000LL)
#define SET(a)      memset((a), -1, sizeof(a))
#define CLR(a)      memset((a), 0, sizeof(a))
#define pil vector<int, pii>
#define pi acos(-1.0)

ll h[1000002];

int main(){
	ios::sync_with_stdio(0), cin.tie(0);
	ll n, i, j;
	cin >> n;
	ll tot = 0;
	for(i = 0; i < n; i++) cin >> h[i], tot += h[i];
	ll sum = ((h[0] + n - 1) *(h[0] + n)) / 2 - ((h[0] - 1) * h[0]) / 2;
	ll x = (tot - sum) / n;
	ll y = h[0];
	for(i = 0; i < n; i++) h[i] = y + i + x;
	tot -= sum, tot -= x * n;
//	cout << tot  << endl;
	for(i = 0; i < n; i++){
		h[i]++;
		tot--;
		if(tot == 0) break;
	}
	for(i = 0; i < n; i++) cout << h[i] << " ";
	cout << endl;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
using namespace std;
using namespace __gnu_cxx;
using namespace __gnu_pbds;

typedef long long         ll;
typedef pair<int, int>    pii;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define read        freopen("in.txt", "r", stdin)
#define write       freopen("out.txt", "w", stdout)
#define all(a)      a.begin(), a.end()
#define ff          first
#define ss          second
#define pb          push_back
#define eps         1e-9
#define inf         (1000000000)
#define infl        (1000000000000000000LL)
#define SET(a)      memset((a), -1, sizeof(a))
#define CLR(a)      memset((a), 0, sizeof(a))
#define pil vector<int, pii>
#define pi acos(-1.0)

ll h[1000002];

int main(){
	ios::sync_with_stdio(0), cin.tie(0);
	ll n, i, j;
	cin >> n;
	ll tot = 0;
	for(i = 0; i < n; i++) cin >> h[i], tot += h[i];
	ll sum = ((h[0] + n - 1) *(h[0] + n)) / 2 - ((h[0] - 1) * h[0]) / 2;
//	cout << sum << endl;

	ll x = (tot - sum) / n;
	ll y = h[0];
	for(i = 0; i < n; i++) h[i] = y + i + x;
	tot -= sum, tot -= x * n;
//	cout << tot  << endl;
	for(i = 0; i < n; i++){
		if(tot == 0) break;
		h[i]++;
		tot--;
		if(tot == 0) break;
	}
	for(i = 0; i < n; i++) cout << h[i] << " ";
	cout << endl;
}


#include <algorithm>
#include <iostream>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cstdio>
#include <string>
#include <vector>
#include <cmath>
#include <ctime>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include<bitset>

using namespace std;

typedef long long ll;
typedef pair < int, int > pii;

#define nd second
#define st first
#define mp make_pair
#define pb push_back
#define orta (((bas)+(son))/2)
#define sol (k+k)
#define sag (k+k+1)

const int N = 1e6 + 5;
const int inf = 1e9 + 5;
const int mod = 1e9 + 7;
const int logN = 17;

int n, m, x, y, z;
ll h[N];

vector< ll > solve(int l, int r) {
	if(l == r) {
		vector< ll > vec;
		vec.pb(h[l]);
		return vec;
	}
	auto al = solve(l, (l + r) / 2);
	auto ar = solve((l + r) / 2 + 1, r);
	int s1 = al.size(), s2 = ar.size();
	vector< int > stk1;
	vector< int > stk2;
	for(int i = 0; i < s1; i++) {
		if(i == 0 or al[i] == al[i - 1]) {
			stk1.pb(s1 - i);
//			cout << " --- " << s1 - i << endl;
		}
	}

	for(int i = 0; i < s2; i++) {
		if(i + 1 == s2 or ar[i] == ar[i + 1]) {
			stk2.pb(i + 1);
//			cout << " +++ " << i + 1 << endl;

		}
	}
	ll val1 = al.back(), val2 = *ar.begin();
	while(val1 + 2 <= val2) {
		int hamle = min(stk1.back(), stk2.back());
		stk1.back() -= hamle;
		stk2.back() -= hamle;
		if(stk1.back() == 0) { val1++; stk1.pop_back(); }
		if(stk2.back() == 0) { val2--; stk2.pop_back(); }
		if(stk1.size() == 0) stk1.pb(s1);
		if(stk2.size() == 0) stk2.pb(s2);
		if(stk1.size() == 1 && stk2.size() == 1) break;
	}
	if(val1 + 2 <= val2) {
		ll lll = 0, rrr = inf * (ll) inf;
		while(lll < rrr) {
			ll mid = (lll + rrr) / 2;
			ll taken = mid / s1 + mid / s2;
			if(mid % s1 >= stk1.back()) taken++;
			if(mid % s2 >= stk2.back()) taken++;
			if(val1 + taken + 2 <= val2) lll = mid + 1;
			else rrr = mid;
		}
		val1 += lll / s1;
		val2 -= lll / s2;
		stk1.back() -= lll % s1;
		stk2.back() -= lll % s2;
		if(stk1.back() <= 0) {
			val1++;
			stk1.back() += s1;
		}
		if(stk2.back() <= 0) {
			val2--;
			stk2.back() += s2;
		}
	}
	vector< ll > res(s1 + s2);
	res[s1 - 1] = val1;
	for(int i = s1 - 2; i >= 0; i--) {
		if(stk1.back() == s1 - i - 1) {
			res[i] = res[i + 1];
			stk1.pop_back();
		}
		else res[i] = res[i + 1] - 1;
	}
	res[s1] = val2;
	for(int i = s1 + 1; i < s1 + s2; i++) {
		if(s1 + stk2.back() == i) {
			res[i] = res[i - 1];
			stk2.pop_back();
		}
		else res[i] = res[i - 1] + 1;
	}
//	for(int i = 0; i < s1 + s2; i++)
//		cout << res[i] << ' ';
//	cout << endl;
	return res;
}

int main() {
	scanf("%d", &n);
	for(int i = 1; i <= n; i++) {
		scanf("%lld", &h[i]);
	}
	auto res = solve(1, n);
	for(int i = 1; i <= n; i++) {
		printf("%lld ", res[i - 1]);
	} cout << endl;
}


#include <algorithm>
#include <iostream>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cstdio>
#include <string>
#include <vector>
#include <cmath>
#include <ctime>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include<bitset>

using namespace std;

typedef long long ll;
typedef pair < int, int > pii;

#define nd second
#define st first
#define mp make_pair
#define pb push_back
#define orta (((bas)+(son))/2)
#define sol (k+k)
#define sag (k+k+1)

const int N = 1e6 + 5;
const int inf = 1e9 + 5;
const int mod = 1e9 + 7;
const int logN = 17;

int n, m, x, y, z;
ll h[N];

vector< ll > solve(int l, int r) {
	if(l == r) {
		vector< ll > vec;
		vec.pb(h[l]);
		return vec;
	}
	auto al = solve(l, (l + r) / 2);
	auto ar = solve((l + r) / 2 + 1, r);
	int s1 = al.size(), s2 = ar.size();
	vector< int > stk1;
	vector< int > stk2;
	for(int i = 0; i < s1; i++) {
		if(i == 0 or al[i] == al[i - 1]) {
			stk1.pb(s1 - i);
//			cout << " --- " << s1 - i << endl;
		}
	}

	for(int i = 0; i < s2; i++) {
		if(i + 1 == s2 or ar[i] == ar[i + 1]) {
			stk2.pb(i + 1);
//			cout << " +++ " << i + 1 << endl;

		}
	}
	ll val1 = al.back(), val2 = *ar.begin();
	while(val1 + 2 <= val2) {
		int hamle = min(stk1.back(), stk2.back());
		stk1.back() -= hamle;
		stk2.back() -= hamle;
		if(stk1.back() == 0) { val1++; stk1.pop_back(); }
		if(stk2.back() == 0) { val2--; stk2.pop_back(); }
		if(stk1.size() == 0) stk1.pb(s1);
		if(stk2.size() == 0) stk2.pb(s2);
		if(stk1.size() == 1 && stk2.size() == 1) break;
	}
	if(val1 + 2 <= val2) {
		ll lll = max(max(0ll, (val2 - val1 - 5)) * s1 * 1.0 / (s1 + s2) * s2 - 5, 0.1);
		val1 += lll / s1;
		val2 -= lll / s2;
		stk1.back() -= lll % s1;
		stk2.back() -= lll % s2;
		if(stk1.back() <= 0) {
			val1++;
			stk1.back() += s1;
		}
		if(stk2.back() <= 0) {
			val2--;
			stk2.back() += s2;
		}
	}
	while(val1 + 2 <= val2) {
		int hamle = min(stk1.back(), stk2.back());
		stk1.back() -= hamle;
		stk2.back() -= hamle;
		if(stk1.back() == 0) { val1++; stk1.pop_back(); }
		if(stk2.back() == 0) { val2--; stk2.pop_back(); }
		if(stk1.size() == 0) stk1.pb(s1);
		if(stk2.size() == 0) stk2.pb(s2);
	}
	vector< ll > res(s1 + s2);
	res[s1 - 1] = val1;
	for(int i = s1 - 2; i >= 0; i--) {
		if(stk1.back() == s1 - i - 1) {
			res[i] = res[i + 1];
			stk1.pop_back();
		}
		else res[i] = res[i + 1] - 1;
	}
	res[s1] = val2;
	for(int i = s1 + 1; i < s1 + s2; i++) {
		if(s1 + stk2.back() == i) {
			res[i] = res[i - 1];
			stk2.pop_back();
		}
		else res[i] = res[i - 1] + 1;
	}
//	for(int i = 0; i < s1 + s2; i++)
//		cout << res[i] << ' ';
//	cout << endl;
	return res;
}

int main() {
	scanf("%d", &n);
	for(int i = 1; i <= n; i++) {
		scanf("%lld", &h[i]);
	}
	auto res = solve(1, n);
	for(int i = 1; i <= n; i++) {
		printf("%lld ", res[i - 1]);
	} cout << endl;
}


#include <algorithm>
#include <iostream>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cstdio>
#include <string>
#include <vector>
#include <cmath>
#include <ctime>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include<bitset>

using namespace std;

typedef long long ll;
typedef pair < int, int > pii;

#define nd second
#define st first
#define mp make_pair
#define pb push_back
#define orta (((bas)+(son))/2)
#define sol (k+k)
#define sag (k+k+1)

const int N = 1e6 + 5;
const int inf = 1e9 + 5;
const int mod = 1e9 + 7;
const int logN = 17;

int n, m, x, y, z;
ll h[N];

vector< ll > solve(int l, int r) {
	if(l == r) {
		vector< ll > vec;
		vec.pb(h[l]);
		return vec;
	}
	auto al = solve(l, (l + r) / 2);
	auto ar = solve((l + r) / 2 + 1, r);
	int s1 = al.size(), s2 = ar.size();
	vector< int > stk1;
	vector< int > stk2;
	for(int i = 0; i < s1; i++) {
		if(i == 0 or al[i] == al[i - 1]) {
			stk1.pb(s1 - i);
//			cout << " --- " << s1 - i << endl;
		}
	}

	for(int i = 0; i < s2; i++) {
		if(i + 1 == s2 or ar[i] == ar[i + 1]) {
			stk2.pb(i + 1);
//			cout << " +++ " << i + 1 << endl;

		}
	}
	ll val1 = al.back(), val2 = *ar.begin();
	while(val1 + 2 <= val2) {
		int hamle = min(stk1.back(), stk2.back());
		stk1.back() -= hamle;
		stk2.back() -= hamle;
		if(stk1.back() == 0) { val1++; stk1.pop_back(); }
		if(stk2.back() == 0) { val2--; stk2.pop_back(); }
		if(stk1.size() == 0) stk1.pb(s1);
		if(stk2.size() == 0) stk2.pb(s2);
	}
	vector< ll > res(s1 + s2);
	res[s1 - 1] = val1;
	for(int i = s1 - 2; i >= 0; i--) {
		if(stk1.back() == s1 - i - 1) {
			res[i] = res[i + 1];
			stk1.pop_back();
		}
		else res[i] = res[i + 1] - 1;
	}
	res[s1] = val2;
	for(int i = s1 + 1; i < s1 + s2; i++) {
		if(s1 + stk2.back() == i) {
			res[i] = res[i - 1];
			stk2.pop_back();
		}
		else res[i] = res[i - 1] + 1;
	}
//	for(int i = 0; i < s1 + s2; i++)
//		cout << res[i] << ' ';
//	cout << endl;
	return res;
}

int main() {
	scanf("%d", &n);
	for(int i = 1; i <= n; i++) {
		scanf("%lld", &h[i]);
	}
	auto res = solve(1, n);
	for(int i = 1; i <= n; i++) {
		printf("%lld ", res[i - 1]);
	} cout << endl;
}


#include <algorithm>
#include <iostream>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cstdio>
#include <string>
#include <vector>
#include <cmath>
#include <ctime>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include<bitset>

using namespace std;

typedef long long ll;
typedef pair < int, int > pii;

#define nd second
#define st first
#define mp make_pair
#define pb push_back
#define orta (((bas)+(son))/2)
#define sol (k+k)
#define sag (k+k+1)

const int N = 1e6 + 5;
const int inf = 1e9 + 5;
const int mod = 1e9 + 7;
const int logN = 17;

int n, m, x, y, z;
ll h[N];

vector< ll > solve(int l, int r) {
	if(l == r) {
		vector< ll > vec;
		vec.pb(h[l]);
		return vec;
	}
	auto al = solve(l, (l + r) / 2);
	auto ar = solve((l + r) / 2 + 1, r);
	int s1 = al.size(), s2 = ar.size();
	vector< int > stk1;
	vector< int > stk2;
	for(int i = 0; i < s1; i++) {
		if(i == 0 or al[i] == al[i - 1]) {
			stk1.pb(s1 - i);
//			cout << " --- " << s1 - i << endl;
		}
	}

	for(int i = 0; i < s2; i++) {
		if(i + 1 == s2 or ar[i] == ar[i + 1]) {
			stk2.pb(i + 1);
//			cout << " +++ " << i + 1 << endl;

		}
	}
	ll val1 = al.back(), val2 = *ar.begin();
	while(val1 + 2 <= val2) {
		int hamle = min(stk1.back(), stk2.back());
		stk1.back() -= hamle;
		stk2.back() -= hamle;
		if(stk1.back() == 0) { val1++; stk1.pop_back(); }
		if(stk2.back() == 0) { val2--; stk2.pop_back(); }
		if(stk1.size() == 0) stk1.pb(s1);
		if(stk2.size() == 0) stk2.pb(s2);
		if(stk1.size() == 1 && stk2.size() == 1) break;
	}
	if(val1 + 2 <= val2) {
		ll lll = max(max(0ll, (val2 - val1 - 5)) * s1 * 1.0 / (s1 + s2) * s2 - 5, 0.1);
		val1 += lll / s1;
		val2 -= lll / s2;
		stk1.back() -= lll % s1;
		stk2.back() -= lll % s2;
		if(stk1.back() <= 0) {
			val1++;
			stk1.back() += s1;
		}
		if(stk2.back() <= 0) {
			val2--;
			stk2.back() += s2;
		}
	}
	while(val1 + 2 <= val2) {
		int hamle = min(stk1.back(), stk2.back());
		stk1.back() -= hamle;
		stk2.back() -= hamle;
		if(stk1.back() == 0) { val1++; stk1.pop_back(); }
		if(stk2.back() == 0) { val2--; stk2.pop_back(); }
		if(stk1.size() == 0) stk1.pb(s1);
		if(stk2.size() == 0) stk2.pb(s2);
		if(stk1.size() == 1 && stk2.size() == 1) break;
	}
	vector< ll > res(s1 + s2);
	res[s1 - 1] = val1;
	for(int i = s1 - 2; i >= 0; i--) {
		if(stk1.back() == s1 - i - 1) {
			res[i] = res[i + 1];
			stk1.pop_back();
		}
		else res[i] = res[i + 1] - 1;
	}
	res[s1] = val2;
	for(int i = s1 + 1; i < s1 + s2; i++) {
		if(s1 + stk2.back() == i) {
			res[i] = res[i - 1];
			stk2.pop_back();
		}
		else res[i] = res[i - 1] + 1;
	}
//	for(int i = 0; i < s1 + s2; i++)
//		cout << res[i] << ' ';
//	cout << endl;
	return res;
}

int main() {
	scanf("%d", &n);
	for(int i = 1; i <= n; i++) {
		scanf("%lld", &h[i]);
	}
	auto res = solve(1, n);
	for(int i = 1; i <= n; i++) {
		printf("%lld ", res[i - 1]);
	} cout << endl;
}


/*
    Author : zzugzx
    Lang : C++
    Blog : blog.csdn.net/qq_43756519
*/
#include<bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define endl '\n'
#define SZ(x) (int)x.size()
#define mem(a, b) memset(a, b, sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int mod = 1e9 + 7;
//const int mod = 998244353;

const double eps = 1e-6;
const double pi = acos(-1.0);
const int maxn = 1e6 + 10;
const int N = 1e2 + 5;
const ll inf = 0x3f3f3f3f;
const ll oo = 8e18;
const int dir[][2]={{0, 1}, {1, 0}, {0, -1}, {-1, 0}, {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
//  freopen("in.txt", "r", stdin);
//  freopen("out.txt", "w", stdout);
    int n;
    cin >> n;
    ll sum = 0;
    for (int i = 1; i <= n; i++){
        ll x;
        cin >> x, sum += x;
    }
    sum -= (n - 1) * n / 2;
    ll a = sum / n, b = sum % n;
    for (int i = 1; i <= n; i++)
        cout << i - 1 + a + (i <= b) << ' ';
    return 0;
}


/*
    Author : zzugzx
    Lang : C++
    Blog : blog.csdn.net/qq_43756519
*/
#include<bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define endl '\n'
#define SZ(x) (int)x.size()
#define mem(a, b) memset(a, b, sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int mod = 1e9 + 7;
//const int mod = 998244353;

const double eps = 1e-6;
const double pi = acos(-1.0);
const int maxn = 1e6 + 10;
const int N = 1e2 + 5;
const ll inf = 0x3f3f3f3f;
const ll oo = 8e18;
const int dir[][2]={{0, 1}, {1, 0}, {0, -1}, {-1, 0}, {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
//  freopen("in.txt", "r", stdin);
//  freopen("out.txt", "w", stdout);
    ll n;
    cin >> n;
    ll sum = 0;
    for (int i = 1, x; i <= n; i++){
        ll x;
        cin >> x, sum += x;
    }
    sum -= (n - 1) * n / 2;
    ll a = sum / n, b = sum % n;
    for (int i = 1; i <= n; i++)
        cout << i - 1 + a + (i <= b) << ' ';
    return 0;
}


/*
    Author : zzugzx
    Lang : C++
    Blog : blog.csdn.net/qq_43756519
*/
#include<bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define endl '\n'
#define SZ(x) (int)x.size()
#define mem(a, b) memset(a, b, sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int mod = 1e9 + 7;
//const int mod = 998244353;

const double eps = 1e-6;
const double pi = acos(-1.0);
const int maxn = 1e6 + 10;
const int N = 1e2 + 5;
const ll inf = 0x3f3f3f3f;
const ll oo = 8e18;
const int dir[][2]={{0, 1}, {1, 0}, {0, -1}, {-1, 0}, {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
//  freopen("in.txt", "r", stdin);
//  freopen("out.txt", "w", stdout);
    int n;
    cin >> n;
    ll sum = 0;
    for (int i = 1, x; i <= n; i++)
        cin >> x, sum += x;
    sum -= (n - 1) * n / 2;
    ll a = sum / n, b = sum % n;
    for (int i = 1; i <= n; i++)
        cout << i - 1 + a + (i <= b) << ' ';
    return 0;
}


/*
    Author : zzugzx
    Lang : C++
    Blog : blog.csdn.net/qq_43756519
*/
#include<bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define endl '\n'
#define SZ(x) (int)x.size()
#define mem(a, b) memset(a, b, sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int mod = 1e9 + 7;
//const int mod = 998244353;

const double eps = 1e-6;
const double pi = acos(-1.0);
const int maxn = 1e6 + 10;
const int N = 1e2 + 5;
const ll inf = 0x3f3f3f3f;
const ll oo = 8e18;
const int dir[][2]={{0, 1}, {1, 0}, {0, -1}, {-1, 0}, {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
//  freopen("in.txt", "r", stdin);
//  freopen("out.txt", "w", stdout);
    ll n;
    cin >> n;
    ll sum = 0;
    for (int i = 1, x; i <= n; i++)
        cin >> x, sum += x;
    sum -= (n - 1) * n / 2;
    ll a = sum / n, b = sum % n;
    for (int i = 1; i <= n; i++)
        cout << i - 1 + a + (i <= b) << ' ';
    return 0;
}


/*
    Author : zzugzx
    Lang : C++
    Blog : blog.csdn.net/qq_43756519
*/
#include<bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define endl '\n'
#define SZ(x) (int)x.size()
#define mem(a, b) memset(a, b, sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int mod = 1e9 + 7;
//const int mod = 998244353;

const double eps = 1e-6;
const double pi = acos(-1.0);
const int maxn = 1e6 + 10;
const int N = 1e2 + 5;
const ll inf = 0x3f3f3f3f;
const ll oo = 8e18;
const int dir[][2]={{0, 1}, {1, 0}, {0, -1}, {-1, 0}, {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
//  freopen("in.txt", "r", stdin);
//  freopen("out.txt", "w", stdout);
    ll n;
    cin >> n;
    ll sum = 0;
    for (int i = 1; i <= n; i++){
        ll x;
        cin >> x;
        sum += x;
    }
    sum -= (n - 1) * n / 2;
    ll a = sum / n, b = sum % n;
    for (int i = 1; i <= n; i++)
        cout << i - 1 + a + (i <= b) << ' ';
    return 0;
}


#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <chrono>
#include <climits>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;

template <class T1, class T2>
ostream& operator << (ostream& out, const pair <T1, T2> p)
{
    out << '(' << p.first << ',' << p.second << ')';
    return out;
}

template <class T1, class T2>
istream& operator >> (istream& in, pair<T1, T2> &p)
{
    in >> p.first >> p.second;
    return in;
}

template <class T>
istream& operator >> (istream& in, vector<T> &v)
{
    for (T &x : v)
        in >> x;
    return in;
}

template <class T>
ostream& operator << (ostream& out, const vector<vector<T>> &v)
{
    for (const vector<T> &x : v)
        out << x << '\n';
    return out;
}

template <class T>
ostream& operator << (ostream& out, const vector<T> &v)
{
    for (const T &x : v)
        out << x << ' ';
    return out;
}

long long gcd (long long a, long long b)
{
    if (b > a)
        swap(a, b);
    return (b ? gcd(b, a % b) : a);
}

using ll   = long long;
using pii  = pair<int, int>;
using pll  = pair<long long, long long>;
using tiii = pair<pair<int, int>, int>;
using vi   = vector<int>;
using vl   = vector<long long>;
using vvi  = vector<vector<int>>;
using vvl  = vector<vector<long long>>;

#define F          first
#define S          second
#define First      first.first
#define Second     first.second
#define Third      second
#define mp         make_pair
#define rep(i,a,b) for (int i = (a); i < (b); i++)
#define per(i,b,a) for (int i = (b); i > (a); i--)
#define all(x)     x.begin(), x.end()
#define ret(x)     return cout << x, 0;
#define throwex    throw runtime_error ("Found the error.");

const int h = 1000000007;

signed main()
{
    ios::sync_with_stdio(false);
    #ifdef ONLINE_JUDGE
    cin.tie(nullptr);
    cout.tie(nullptr);
    cerr.setstate(ios::failbit);
    #endif

    int n;
    cin >> n;
    vl v(n);
    cin >> v;
    ll st = v[0], ex = 0;
    rep(i,1,n)
    {
        st++;
        ll rem = v[i] - st;
        ll z = min((ll) i + 1, rem);
        ex += z;
        rem -= z;
        if(ex == i + 1)
            st++, ex = 0;
        st += rem / (i + 1);
        ex += rem % (i + 1);
    }
    cerr << st << ' ' << ex << '\n';
    rep(i,0,n)
        cout << st - n + 1 + i + (i + 1 <= ex) << ' ';
}


#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <chrono>
#include <climits>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;

template <class T1, class T2>
ostream& operator << (ostream& out, const pair <T1, T2> p)
{
    out << '(' << p.first << ',' << p.second << ')';
    return out;
}

template <class T1, class T2>
istream& operator >> (istream& in, pair<T1, T2> &p)
{
    in >> p.first >> p.second;
    return in;
}

template <class T>
istream& operator >> (istream& in, vector<T> &v)
{
    for (T &x : v)
        in >> x;
    return in;
}

template <class T>
ostream& operator << (ostream& out, const vector<vector<T>> &v)
{
    for (const vector<T> &x : v)
        out << x << '\n';
    return out;
}

template <class T>
ostream& operator << (ostream& out, const vector<T> &v)
{
    for (const T &x : v)
        out << x << ' ';
    return out;
}

long long gcd (long long a, long long b)
{
    if (b > a)
        swap(a, b);
    return (b ? gcd(b, a % b) : a);
}

using ll   = long long;
using pii  = pair<int, int>;
using pll  = pair<long long, long long>;
using tiii = pair<pair<int, int>, int>;
using vi   = vector<int>;
using vl   = vector<long long>;
using vvi  = vector<vector<int>>;
using vvl  = vector<vector<long long>>;

#define F          first
#define S          second
#define First      first.first
#define Second     first.second
#define Third      second
#define mp         make_pair
#define rep(i,a,b) for (int i = (a); i < (b); i++)
#define per(i,b,a) for (int i = (b); i > (a); i--)
#define all(x)     x.begin(), x.end()
#define ret(x)     return cout << x, 0;
#define throwex    throw runtime_error ("Found the error.");

const int h = 1000000007;

signed main()
{
    ios::sync_with_stdio(false);
    #ifdef ONLINE_JUDGE
    cin.tie(nullptr);
    cout.tie(nullptr);
    cerr.setstate(ios::failbit);
    #endif

    int n;
    cin >> n;
    vl v(n);
    cin >> v;
    ll st = v[0], ex = 0;
    rep(i,1,n)
    {
        st++;
        ll rem = v[i] - st;
        ll z = min(i + 1 - ex, rem);
        ex += z;
        rem -= z;
        if(ex == i + 1)
            st++, ex = 0;
        st += rem / (i + 1);
        ex += rem % (i + 1);
    }
    rep(i,0,n)
        cout << st - n + 1 + i + (i + 1 <= ex) << ' ';
}


#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,i;
	cin>>n;
	long long a,tot=0,pl1,pl2;
	for(i=0;i<n;i++){
		cin>>a;
		tot+=a;
	}
	pl1=(tot-n*(n-1)/2)/n;
	pl2=(tot-n*(n-1)/2)%n;
	bool pl[n]={0};
	for(i=0;i<pl2;i++)pl[i]=1;
	for(i=0;i<n;i++)cout<<i+pl1+pl[i]<<' ';
}


#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,i;
	cin>>n;
	long long a,tot=0,pl1,pl2;
	for(i=0;i<n;i++){
		cin>>a;
		tot+=a;
	}
	pl1=(tot-n*(n-1)/2)/n;
	pl2=(tot-n*(n-1)/2)%n;
	bool pl[n];
	for(i=0;i<pl2;i++)pl[i]=1;
	for(i=0;i<n;i++)cout<<i+pl1+pl[i]<<' ';
}


#include<bits/stdc++.h>
using namespace std;
int main(){
	std::ios::sync_with_stdio(false);
	long long n,i;
	cin>>n;
	long long a,tot=0,pl1,pl2;
	for(i=0;i<n;i++){
		cin>>a;
		tot+=a;
	}
	pl1=(tot-n*(n-1)/2)/n;
	pl2=(tot-n*(n-1)/2)%n;
	for(i=0;i<n;i++){
		if(i<pl2)cout<<i+pl1+1<<' ';
		else cout<<i+pl1<<' ';
	}
}


#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,i;
	cin>>n;
	long long a[n],tot=0,pl1,pl2;
	for(i=0;i<n;i++){
		cin>>a[n];
		tot+=a[n];
	}
	pl1=(tot-n*(n-1)/2)/n;
	pl2=(tot-n*(n-1)/2)%n;
	for(i=0;i<n;i++){
		cout<<i+pl1+pl2/(i+1)<<' ';
	}
}


#include<bits/stdc++.h>
using namespace std;
int main(){
	long long n,i;
	cin>>n;
	long long a,tot=0,pl1,pl2;
	for(i=0;i<n;i++){
		cin>>a;
		tot+=a;
	}
	pl1=(tot-n*(n-1)/2)/n;
	pl2=(tot-n*(n-1)/2)%n;
	bool pl[n]={0};
	for(i=0;i<pl2;i++)pl[i]=1;
	for(i=0;i<n;i++)cout<<i+pl1+pl[i]<<' ';
}


#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,i;
	cin>>n;
	long long a,tot=0,pl1,pl2;
	for(i=0;i<n;i++){
		cin>>a;
		tot+=a;
	}
	pl1=(tot-n*(n-1)/2)/n;
	pl2=(tot-n*(n-1)/2)%n;
	for(i=0;i<n;i++){
		cout<<i+pl1+pl2/(i+1)<<' ';
	}
}


#include <bits/stdc++.h>
#define pb push_back
#define er erase
#define in insert
#define s(a, x, y) sort(a.begin()+x, a.begin()+y);
#define r(a, x, y) reverse(a.begin()+x, a.begin()+y);
#define mp make_pair
#define F first
#define S second
#define ll long long
#define ld double
#define forn(i, a, b) for(int i=a; i<=b; i++)
#define form(i, a, b) for(int i=a; i>=b; i--)
#define PI 3.14159265358979
#define inf 2147483647
#define sp setprecision
using namespace std;
ll n, x, s, a, b;
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cin>>n;
	forn(i, 1, n){
		cin>>x;
		s+=x;
	}
	a=(s-n*(n-1)/2)/n;
	b=(s-n*(n-1)/2)%n;
	forn(i, 1, n){
		cout<<i-1+a+(i<=b)<<" ";
	}
	return 0;
}


#include <bits/stdc++.h>
#define pb push_back
#define er erase
#define in insert
#define s(a, x, y) sort(a.begin()+x, a.begin()+y);
#define r(a, x, y) reverse(a.begin()+x, a.begin()+y);
#define mp make_pair
#define F first
#define S second
#define ll long long
#define ld double
#define forn(i, a, b) for(int i=a; i<=b; i++)
#define form(i, a, b) for(int i=a; i>=b; i--)
#define PI 3.14159265358979
#define inf 2147483647
#define sp setprecision
using namespace std;
ll n, x, s, a, b, c;
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	scanf("%d", &n);
	forn(i, 1, n){
		scanf("%d", &x);
		s+=x;
	}
	a=(s-n*(n-1)/2)/n;
	b=(s-n*(n-1)/2)%n;
	forn(i, 1, n){
		c=i-1+a+(i<=b);
		printf("%d ", c);
	}
	return 0;
}


#include <bits/stdc++.h>
#define pb push_back
#define er erase
#define in insert
#define s(a, x, y) sort(a.begin()+x, a.begin()+y);
#define r(a, x, y) reverse(a.begin()+x, a.begin()+y);
#define mp make_pair
#define F first
#define S second
#define ll long long
#define ld double
#define forn(i, a, b) for(int i=a; i<=b; i++)
#define form(i, a, b) for(int i=a; i>=b; i--)
#define PI 3.14159265358979
#define inf 2147483647
#define sp setprecision
using namespace std;
ll n, x, s, a, b;
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	scanf("%d", &n);
	forn(i, 1, n){
		scanf("%d", &x);
		s+=x;
	}
	a=(s-n*(n-1)/2)/n;
	b=(s-n*(n-1)/2)%n;
	forn(i, 1, n){
		printf("%d ", i-1+a+(i<=b));
	}
	return 0;
}


#include <bits/stdc++.h>
#define pb push_back
#define er erase
#define in insert
#define s(a, x, y) sort(a.begin()+x, a.begin()+y);
#define r(a, x, y) reverse(a.begin()+x, a.begin()+y);
#define mp make_pair
#define F first
#define S second
#define ll long long
#define ld double
#define forn(i, a, b) for(int i=a; i<=b; i++)
#define form(i, a, b) for(int i=a; i>=b; i--)
#define PI 3.14159265358979
#define inf 2147483647
#define sp setprecision
using namespace std;
ll n, x, s, a, b, c;
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	scanf("%lld", &n);
	forn(i, 1, n){
		scanf("%lld", &x);
		s+=x;
	}
	a=(s-n*(n-1)/2)/n;
	b=(s-n*(n-1)/2)%n;
	forn(i, 1, n){
		printf("%lld ", i-1+a+(i<=b));
	}
	return 0;
}


#include <bits/stdc++.h>
#define pb push_back
#define er erase
#define in insert
#define s(a, x, y) sort(a.begin()+x, a.begin()+y);
#define r(a, x, y) reverse(a.begin()+x, a.begin()+y);
#define mp make_pair
#define F first
#define S second
#define ll long long
#define ld double
#define forn(i, a, b) for(int i=a; i<=b; i++)
#define form(i, a, b) for(int i=a; i>=b; i--)
#define PI 3.14159265358979
#define inf 2147483647
#define sp setprecision
using namespace std;
ll n, x, s, a, b, c;
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	scanf("%d", &n);
	forn(i, 1, n){
		scanf("%d", &x);
		s+=x;
	}
	a=(s-n*(n-1)/2)/n;
	b=(s-n*(n-1)/2)%n;
	forn(i, 1, n){
		printf("%lld ", i-1+a+(i<=b));
	}
	return 0;
}


// Author : heyuhhh
// Created Time : 2020/08/22 17:26:01
#include<bits/stdc++.h>
#define MP make_pair
#define fi first
#define se second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define INF 0x3f3f3f3f
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
//head
const int N = 1e5 + 5;
void run() {
    int n;
    cin >> n;
    vector<ll> a(n);
    ll sum = 0;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        sum += a[i];
    }
    ll tot = 0;
    auto ok = [&] (ll x, int i) {
        return 1ll * (n - i) * x + tot <= sum && sum <= 1ll * (2 * x + n - i) * (n - i) / 2 + tot;
    };
    ll x = sum / n;
    for (int i = 0; i < n; i++) {
        if (!ok(x, i)) ++x;
        tot += x;
        cout << x;
        if (i != n - 1) cout << ' ';
        else cout << '\n';
    }
}
int main() {
#ifdef Local
    freopen("input.in", "r", stdin);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    cout << fixed << setprecision(20);
    run();
    return 0;
}


// Author : heyuhhh
// Created Time : 2020/08/22 17:26:01
#include<bits/stdc++.h>
#define MP make_pair
#define fi first
#define se second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define INF 0x3f3f3f3f
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
//head
const int N = 1e5 + 5;
void run() {
    int n;
    cin >> n;
    vector<ll> a(n);
    ll sum = 0;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        sum += a[i];
    }
    ll tot = 0;
    auto ok = [&] (ll x, int i) {
        return 1ll * (n - i) * x + tot <= sum && sum <= 1ll * (2 * x + n - i - 1) * (n - i) / 2 + tot;
    };
    ll x = 0;
    for (int i = 0; i < n; i++) {
        while (!ok(x, i)) ++x;
        tot += x;
        cout << x;
        if (i != n - 1) cout << ' ';
        else cout << '\n';
    }
}
int main() {
#ifdef Local
    freopen("input.in", "r", stdin);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    cout << fixed << setprecision(20);
    run();
    return 0;
}


// Author : heyuhhh
// Created Time : 2020/08/22 17:26:01
#include<bits/stdc++.h>
#define MP make_pair
#define fi first
#define se second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define INF 0x3f3f3f3f
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
//head
const int N = 1e5 + 5;
void run() {
    int n;
    cin >> n;
    vector<ll> a(n);
    ll sum = 0;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        sum += a[i];
    }
    ll tot = 0;
    auto ok = [&] (ll x, int i) {
        return 1ll * (n - i) * x + tot <= sum && sum <= 1ll * (2 * x + n - i - 1) * (n - i) / 2 + tot;
    };
    ll x = sum / n;
    for (int i = 0; i < n; i++) {
        if (!ok(x, i)) ++x;
        tot += x;
        cout << x;
        if (i != n - 1) cout << ' ';
        else cout << '\n';
    }
}
int main() {
#ifdef Local
    freopen("input.in", "r", stdin);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    cout << fixed << setprecision(20);
    run();
    return 0;
}


// Author : heyuhhh
// Created Time : 2020/08/22 17:26:01
#include<bits/stdc++.h>
#define MP make_pair
#define fi first
#define se second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define INF 0x3f3f3f3f
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
//head
const int N = 1e5 + 5;
void run() {
    int n;
    cin >> n;
    vector<ll> a(n);
    ll sum = 0;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        sum += a[i];
    }
    ll tot = 0;
    auto ok = [&] (ll x, int i) {
        return 1ll * (n - i) * x + tot <= sum && sum <= x + 1ll * (2 * x + n - i) * (n - i - 1) / 2 + tot;
    };
    ll x = sum / n;
    for (int i = 0; i < n; i++) {
        if (!ok(x, i)) ++x;
        tot += x;
        cout << x;
        if (i != n - 1) cout << ' ';
        else cout << '\n';
    }
}
int main() {
#ifdef Local
    freopen("input.in", "r", stdin);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    cout << fixed << setprecision(20);
    run();
    return 0;
}


// Author : heyuhhh
// Created Time : 2020/08/22 17:26:01
#include<bits/stdc++.h>
#define MP make_pair
#define fi first
#define se second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define INF 0x3f3f3f3f
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
//head
const int N = 1e5 + 5;
void run() {
    int n;
    cin >> n;
    vector<ll> a(n);
    ll sum = 0;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        sum += a[i];
    }
    ll tot = 0;
    auto ok = [&] (ll x, int i) {
        return 1ll * (n - i) * x + tot <= sum && sum <= 1ll * (2 * x + n - i - 1) * (n - i) / 2 + tot;
    };
    auto ok2 = [&] (ll x) {
        return sum <= 1ll * (2 * x + n - 1) * n / 2;
    };
    ll l = 0, r = 1e12 + 1, mid;
    while (l < r) {
        mid = (l + r) >> 1;
        if (ok2(mid)) r = mid;
        else l = mid + 1;
    }
    ll x = r;
    for (int i = 0; i < n; i++) {
        while (!ok(x, i)) ++x;
        tot += x;
        cout << x;
        if (i != n - 1) cout << ' ';
        else cout << '\n';
    }
}
int main() {
#ifdef Local
    freopen("input.in", "r", stdin);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    cout << fixed << setprecision(20);
    run();
    return 0;
}


// Author : heyuhhh
// Created Time : 2020/08/22 17:26:01
#include<bits/stdc++.h>
#define MP make_pair
#define fi first
#define se second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define INF 0x3f3f3f3f
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
//head
const int N = 1e5 + 5;
void run() {
    int n;
    cin >> n;
    vector<ll> a(n);
    ll sum = 0;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        sum += a[i];
    }
    ll tot = 0;
    auto ok = [&] (ll x, int i) {
        return 1ll * (n - i) * x + tot <= sum && sum <= 1ll * (2 * x + n - i - 1) * (n - i) / 2 + tot;
    };
    ll x = 1;
    for (int i = 0; i < n; i++) {
        while (!ok(x, i)) ++x;
        tot += x;
        cout << x;
        if (i != n - 1) cout << ' ';
        else cout << '\n';
    }
}
int main() {
#ifdef Local
    freopen("input.in", "r", stdin);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    cout << fixed << setprecision(20);
    run();
    return 0;
}


/*
Though leaves are many , the root is one.
Through all the lying days of my youth
I swayed my leaves and flowers in the sun.
Now I may wither into the truth.
	  	  	- William Butler Yeats
*/
//#pragma GCC optimize("Ofast,no-stack-protector")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
//#pragma GCC target("avx,tune=native")
#include<bits/stdc++.h>
#define int long long
#pragma comment("-Wl,--stack=1024000000")
//#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
namespace fastio{
    char in[100000];
    int itr=0,llen=0;
    char get(){
        if(itr==llen)llen=fread(in,1,100000,stdin),itr=0;
        if(llen==0)return EOF;
        return in[itr++];
    }
    char out[100000];
    int itr2=0;
    void put(char c){
        out[itr2++]=c;
        if(itr2==100000){
            fwrite(out,1,100000,stdout);
            itr2=0;
        }
    }
    int clear(){
        fwrite(out,1,itr2,stdout);
        itr2=0;
        return 0;
    }
    int getint(){
        int ret=0;char ch=get();
        if(ch=='-')return -getint();
        while (ch<'0'||ch>'9'){
            ch=get();if(ch=='-')return -getint();
        }
        while ('0'<=ch&&ch<='9'){
            ret=ret*10-48+ch;
            ch=get();
        }
        return ret;
    }
    string getstr(){
        string ret="";
        char ch=get();
        while(ch==' '||ch=='\n')ch=get();
        while(ch!=' '&&ch!='\n')ret.push_back(ch),ch=get();
        return ret;
    }
    void putstr(string s){
        for(int i=0;i<s.size();i++)put(s[i]);
    }
    void putint(int x){
        if(x<0){
            put('-');
            putint(-x);
            return;
        }
        if(x==0){
            put('0');put(' ');
            return;
        }
        char c[40];int pos=0;
        while(x){
            c[pos++]='0'+x%10;
            x/=10;
        }
        for(int i=pos-1;i>=0;i--)put(c[i]);
        put(' ');
    }
    void putln(int x){
        if(x<0){
            put('-');
            putln(-x);
            return;
        }
        if(x==0){
            put('0');put('\n');
            return;
        }
        char c[40];int pos=0;
        while(x){
            c[pos++]='0'+x%10;
            x/=10;
        }
        for(int i=pos-1;i>=0;i--)put(c[i]);
        put('\n');
    }
}
using namespace fastio;
//using namespace __gnu_pbds;
const int inf=0x3f3f3f3f;
const double eps=1e-6;
const int mod=1000000007;
typedef long long ll;
#ifndef LOCAL
#define cerr if(0)cout
#define eprintf(...) 0
#else
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#endif
inline string getstr(string &s,int l,int r){string ret="";for(int i=l;i<=r;i++)ret.push_back(s[i]);return ret;}
int modpow(int x,int y,int md=mod){int ret=1;do{if(y&1)ret=(ll)ret*x%md;x=(ll)x*x%md;}while(y>>=1);return ret;}
inline int Rand(){return rand()*32768+rand();}
int n,h[1000005],ans[1000005];
signed main(){
	n=getint();int sum=0;
	for(int i=1;i<=n;i++)h[i]=getint(),sum+=h[i];
	int val=0,pos=0;
	for(int i=1;i<=n;i++)val+=i-1;
	int tms=(sum-val)/n;
	val+=tms*n;pos+=tms;
	for(int i=1;i<=n;i++)h[i]=pos+i-1;
	sum-=val;
	for(int i=1;i<=sum;i++)h[i]++;
	for(int i=1;i<=n;i++)putint(h[i]);
	clear();
	return 0;
}


/*
Though leaves are many , the root is one.
Through all the lying days of my youth
I swayed my leaves and flowers in the sun.
Now I may wither into the truth.
	  	  	- William Butler Yeats
*/
//#pragma GCC optimize("Ofast,no-stack-protector")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
//#pragma GCC target("avx,tune=native")
#include<bits/stdc++.h>
#define int long long
#pragma comment("-Wl,--stack=1024000000")
//#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
namespace fastio{
    char in[100000];
    int itr=0,llen=0;
    char get(){
        if(itr==llen)llen=fread(in,1,100000,stdin),itr=0;
        if(llen==0)return EOF;
        return in[itr++];
    }
    char out[100000];
    int itr2=0;
    void put(char c){
        out[itr2++]=c;
        if(itr2==100000){
            fwrite(out,1,100000,stdout);
            itr2=0;
        }
    }
    int clear(){
        fwrite(out,1,itr2,stdout);
        itr2=0;
        return 0;
    }
    int getint(){
        int ret=0;char ch=get();
        if(ch=='-')return -getint();
        while (ch<'0'||ch>'9'){
            ch=get();if(ch=='-')return -getint();
        }
        while ('0'<=ch&&ch<='9'){
            ret=ret*10-48+ch;
            ch=get();
        }
        return ret;
    }
    string getstr(){
        string ret="";
        char ch=get();
        while(ch==' '||ch=='\n')ch=get();
        while(ch!=' '&&ch!='\n')ret.push_back(ch),ch=get();
        return ret;
    }
    void putstr(string s){
        for(int i=0;i<s.size();i++)put(s[i]);
    }
    void putint(int x){
        if(x<0){
            put('-');
            putint(-x);
            return;
        }
        if(x==0){
            put('0');put(' ');
            return;
        }
        char c[40];int pos=0;
        while(x){
            c[pos++]='0'+x%10;
            x/=10;
        }
        for(int i=pos-1;i>=0;i--)put(c[i]);
        put(' ');
    }
    void putln(int x){
        if(x<0){
            put('-');
            putln(-x);
            return;
        }
        if(x==0){
            put('0');put('\n');
            return;
        }
        char c[40];int pos=0;
        while(x){
            c[pos++]='0'+x%10;
            x/=10;
        }
        for(int i=pos-1;i>=0;i--)put(c[i]);
        put('\n');
    }
}
using namespace fastio;
//using namespace __gnu_pbds;
const int inf=0x3f3f3f3f;
const double eps=1e-6;
const int mod=1000000007;
typedef long long ll;
#ifndef LOCAL
#define cerr if(0)cout
#define eprintf(...) 0
#else
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#endif
inline string getstr(string &s,int l,int r){string ret="";for(int i=l;i<=r;i++)ret.push_back(s[i]);return ret;}
int modpow(int x,int y,int md=mod){int ret=1;do{if(y&1)ret=(ll)ret*x%md;x=(ll)x*x%md;}while(y>>=1);return ret;}
inline int Rand(){return rand()*32768+rand();}
int n,h[1000005],ans[1000005];
signed main(){
	n=getint();int sum=0;
	for(int i=1;i<=n;i++)h[i]=getint(),sum+=h[i];
	int val=0,pos=0;
	for(int i=1;i<=n;i++)val+=i-1;
	while(val+n<=sum){
		val+=n;pos++;
	}
	for(int i=1;i<=n;i++)h[i]=pos+i-1;
	sum-=val;
	for(int i=1;i<=sum;i++)h[i]++;
	for(int i=1;i<=n;i++)putint(h[i]);
	clear();
	return 0;
}


/*
Though leaves are many , the root is one.
Through all the lying days of my youth
I swayed my leaves and flowers in the sun.
Now I may wither into the truth.
	  	  	- William Butler Yeats
*/
//#pragma GCC optimize("Ofast,no-stack-protector")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
//#pragma GCC target("avx,tune=native")
#include<bits/stdc++.h>
#define int long long
#pragma comment("-Wl,--stack=1024000000")
//#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
namespace fastio{
    char in[100000];
    int itr=0,llen=0;
    char get(){
        if(itr==llen)llen=fread(in,1,100000,stdin),itr=0;
        if(llen==0)return EOF;
        return in[itr++];
    }
    char out[100000];
    int itr2=0;
    void put(char c){
        out[itr2++]=c;
        if(itr2==100000){
            fwrite(out,1,100000,stdout);
            itr2=0;
        }
    }
    int clear(){
        fwrite(out,1,itr2,stdout);
        itr2=0;
        return 0;
    }
    int getint(){
        int ret=0;char ch=get();
        if(ch=='-')return -getint();
        while (ch<'0'||ch>'9'){
            ch=get();if(ch=='-')return -getint();
        }
        while ('0'<=ch&&ch<='9'){
            ret=ret*10-48+ch;
            ch=get();
        }
        return ret;
    }
    string getstr(){
        string ret="";
        char ch=get();
        while(ch==' '||ch=='\n')ch=get();
        while(ch!=' '&&ch!='\n')ret.push_back(ch),ch=get();
        return ret;
    }
    void putstr(string s){
        for(int i=0;i<s.size();i++)put(s[i]);
    }
    void putint(int x){
        if(x<0){
            put('-');
            putint(-x);
            return;
        }
        if(x==0){
            put('0');put(' ');
            return;
        }
        char c[40];int pos=0;
        while(x){
            c[pos++]='0'+x%10;
            x/=10;
        }
        for(int i=pos-1;i>=0;i--)put(c[i]);
        put(' ');
    }
    void putln(int x){
        if(x<0){
            put('-');
            putln(-x);
            return;
        }
        if(x==0){
            put('0');put('\n');
            return;
        }
        char c[40];int pos=0;
        while(x){
            c[pos++]='0'+x%10;
            x/=10;
        }
        for(int i=pos-1;i>=0;i--)put(c[i]);
        put('\n');
    }
}
using namespace fastio;
//using namespace __gnu_pbds;
const int inf=0x3f3f3f3f;
const double eps=1e-6;
const int mod=1000000007;
typedef long long ll;
#ifndef LOCAL
#define cerr if(0)cout
#define eprintf(...) 0
#else
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#endif
inline string getstr(string &s,int l,int r){string ret="";for(int i=l;i<=r;i++)ret.push_back(s[i]);return ret;}
int modpow(int x,int y,int md=mod){int ret=1;do{if(y&1)ret=(ll)ret*x%md;x=(ll)x*x%md;}while(y>>=1);return ret;}
inline int Rand(){return rand()*32768+rand();}
int n,h[1000005],ans[1000005];
signed main(){
	n=getint();int sum=0;
	for(int i=1;i<=n;i++)h[i]=getint(),sum+=h[i];
	int val=0,pos=1;
	for(int i=1;i<=n;i++)val+=i;
	while(val+n<=sum){
		val+=n;pos++;
	}
	for(int i=1;i<=n;i++)h[i]=pos+i-1;
	sum-=val;
	for(int i=1;i<=sum;i++)h[i]++;
	for(int i=1;i<=n;i++)putint(h[i]);
	clear();
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long //data types used often, but you don't want to type them time by time
#define ull unsigned long long
#define ui unsigned int
#define mod 1000000007
#define inf 100000000000010
#define us unsigned short
#define IOS ios_base::sync_with_stdio(0); //to synchronize the input of cin and scanf
#define INF LONG_MAX
#define PI 3.1415926535897932384626
#define mp make_pair
#define fi first
#define se second
#define pb push_back
#define rep(x,j,n)for(int x=j;x<n;x++)
#define all(x) (x).begin(), (x).end()

typedef vector<pair<ll,ll>> vpi;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef pair<ll,ll> pi;

bool isprime(ll n)
{
    if(n<=1)return false;
    if(n<=3)return true;
    if(n%2==0||n%3==0)return false;
    for(ll i=5;i*i<=n;i+=6)
    {
        if(n%i==0||n%(i+2)==0)return false;
    }
    return true;
}

ll modexp(ll a,ll b,ll m)
{
    ll r=1;
    a=a%m;
    while(b>0)
    {
        if(b&1)r=(r*a)%m;
        b = b>>1;
        a=(a*a)%m;
    }
    return r%m;
}

struct CustomCompare
{
    bool operator()(const int& lhs, const int& rhs)
    {
        return lhs < rhs;
    }
};

ll builtin_popcount(ll x)
{
    ll cnt = 0;
    for(ll i=60;i>=0;i--)
    {
        if((1LL<<i)&x)cnt++;
    }
    return cnt;
}

ll addmod(ll a,ll b,ll r)
{
    a%=r;
    b%=r;
    return (a+b)%r;
}
ll mulmod(ll a,ll b,ll r)
{
    a%=r;
    b%=r;
    return (a*b)%r;
}
/*
const int mxn = 5*(1e6) +10;
vi spf(mxn);
void sieve()
{
    for(ll i =0;i<mxn;i++)spf[i]  = i;
    for(ll i=2;i<mxn;i+=2)spf[i] = 2;
    for(ll i = 3;i*i<mxn;i++)
    {
        if(spf[i]==i)
        {
            for(ll j = i*i;j<mxn;j+=i)
            {
                if(spf[j]==j)spf[j] = i;
            }
        }
    }
}
*/

int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
ll n; cin>>n;
ll sum = 0;
rep(i,0,n)
{
    ll x; cin>>x;
    sum+=x;
}

ll res = 2LL*sum - n*n + n;
if(res%(2*n)==0)
{
    ll i = res/(2*n);
    while(n--)
    {
        cout<<i<<" ";
        i++;
    }
}
else
{
    res = 2LL*sum - n*n + 3LL*n - 2;
    ll i = res/(2*n);
    cout<<i<<" "<<i<<" ";
    n-=2;
    while(n)
    {
        i++;
        cout<<i<<" ";
        n--;
    }
}
cout<<"\n";
return 0;
}
/*
4 6
10 8 4 3
1 2
2 3

3 4
*/


#include <bits/stdc++.h>
using namespace std;

#define ll long long //data types used often, but you don't want to type them time by time
#define ull unsigned long long
#define ui unsigned int
#define mod 1000000007
#define inf 100000000000010
#define us unsigned short
#define IOS ios_base::sync_with_stdio(0); //to synchronize the input of cin and scanf
#define INF LONG_MAX
#define PI 3.1415926535897932384626
#define mp make_pair
#define fi first
#define se second
#define pb push_back
#define rep(x,j,n)for(int x=j;x<n;x++)
#define all(x) (x).begin(), (x).end()

typedef vector<pair<ll,ll>> vpi;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef pair<ll,ll> pi;

bool isprime(ll n)
{
    if(n<=1)return false;
    if(n<=3)return true;
    if(n%2==0||n%3==0)return false;
    for(ll i=5;i*i<=n;i+=6)
    {
        if(n%i==0||n%(i+2)==0)return false;
    }
    return true;
}

ll modexp(ll a,ll b,ll m)
{
    ll r=1;
    a=a%m;
    while(b>0)
    {
        if(b&1)r=(r*a)%m;
        b = b>>1;
        a=(a*a)%m;
    }
    return r%m;
}

struct CustomCompare
{
    bool operator()(const int& lhs, const int& rhs)
    {
        return lhs < rhs;
    }
};

ll builtin_popcount(ll x)
{
    ll cnt = 0;
    for(ll i=60;i>=0;i--)
    {
        if((1LL<<i)&x)cnt++;
    }
    return cnt;
}

ll addmod(ll a,ll b,ll r)
{
    a%=r;
    b%=r;
    return (a+b)%r;
}
ll mulmod(ll a,ll b,ll r)
{
    a%=r;
    b%=r;
    return (a*b)%r;
}
/*
const int mxn = 5*(1e6) +10;
vi spf(mxn);
void sieve()
{
    for(ll i =0;i<mxn;i++)spf[i]  = i;
    for(ll i=2;i<mxn;i+=2)spf[i] = 2;
    for(ll i = 3;i*i<mxn;i++)
    {
        if(spf[i]==i)
        {
            for(ll j = i*i;j<mxn;j+=i)
            {
                if(spf[j]==j)spf[j] = i;
            }
        }
    }
}
*/

int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
ll n; cin>>n;
ll sum = 0;
rep(i,0,n)
{
    ll x; cin>>x;
    sum+=x;
}
sum-=(n*(n-1))/2;
ll j = sum/n ,k = sum%n;
vi ans(n);
rep(i,0,n)ans[i] = i+j+(k>=i+1);
for(auto x:ans)cout<<x<<" ";
cout<<endl;
return 0;
}
/*
4 6
10 8 4 3
1 2
2 3

3 4
*/


/*
 *  Author : Jk_Chen
 *    Date : 2020-09-11-08.11.23
 */
#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define LD long double
#define rep(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define per(i,a,b) for(int i=(int)(a);i>=(int)(b);i--)
#define mmm(a,b) memset(a,b,sizeof(a))
#define pb push_back
#define pill pair<int, int>
#define fi first
#define se second
void test(){cerr<<"\n";}
template<typename T,typename... Args>void test(T x,Args... args){cerr<<"> "<<x<<" ";test(args...);}
const LL mod=1e9+7;
const int maxn=1e6+9;
const int inf=0x3f3f3f3f;
LL rd(){ LL ans=0; char last=' ',ch=getchar();
    while(!(ch>='0' && ch<='9'))last=ch,ch=getchar();
    while(ch>='0' && ch<='9')ans=ans*10+ch-'0',ch=getchar();
    if(last=='-')ans=-ans; return ans;
}
#define rd rd()
/*_________________________________________________________begin*/

/// 1 3 5
/// 2 3 4

int n;
LL a[maxn];

LL getSum(LL st,int pos){
    if(pos==0){
        return (st+st+n-1)*n/2;
    }
    else{
        return (st+st+n-1)*n/2-(n-pos);
    }
}

int main(){
    n=rd;
    LL sum=0;
    rep(i,1,n){
        a[i]=rd;
        sum+=a[i];
    }
    rep(i,0,n-1){
        LL l=0,r=1e12;
        while(l<=r){
            LL mid=l+r>>1;
            LL tmp=getSum(mid,i);
            if(tmp==sum){
                rep(j,1,n){
                    if(i==0){
                        printf("%lld%c",mid+j-1," \n"[j==n]);
                    }
                    else{
                        if(j>i)
                            printf("%lld%c",mid+j-2," \n"[j==n]);
                        else
                            printf("%lld%c",mid+j-1," \n"[j==n]);
                    }
                }
                return 0;
            }
            if(tmp>sum)r=mid-1;
            else l=mid+1;
        }
    }

    return 0;
}

/*_________________________________________________________end*/


/*
 *  Author : Jk_Chen
 *    Date : 2020-09-11-08.11.23
 */
#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define LD long double
#define rep(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define per(i,a,b) for(int i=(int)(a);i>=(int)(b);i--)
#define mmm(a,b) memset(a,b,sizeof(a))
#define pb push_back
#define pill pair<int, int>
#define fi first
#define se second
void test(){cerr<<"\n";}
template<typename T,typename... Args>void test(T x,Args... args){cerr<<"> "<<x<<" ";test(args...);}
const LL mod=1e9+7;
const int maxn=1e6+9;
const int inf=0x3f3f3f3f;
LL rd(){ LL ans=0; char last=' ',ch=getchar();
    while(!(ch>='0' && ch<='9'))last=ch,ch=getchar();
    while(ch>='0' && ch<='9')ans=ans*10+ch-'0',ch=getchar();
    if(last=='-')ans=-ans; return ans;
}
#define rd rd()
/*_________________________________________________________begin*/

/// 1 3 5
/// 2 3 4

int n;
LL a[maxn];

LL getSum(LL st,int pos){
    if(pos==0){
        return (st+st+n-1)*n/2;
    }
    else{
        return (st+st+n-1)*n/2-(n-1);
    }
}

int main(){
    n=rd;
    LL sum=0;
    rep(i,1,n){
        a[i]=rd;
        sum+=a[i];
    }
    rep(i,0,n-1){
        LL l=0,r=1e12;
        while(l<=r){
            LL mid=l+r>>1;
            LL tmp=getSum(mid,i);
            if(tmp==sum){
                test(mid,i);
                rep(j,1,n){
                    if(i==0){
                        printf("%lld%c",mid+j-1," \n"[j==n]);
                    }
                    else{
                        if(j>i)
                            printf("%lld%c",mid+j-2," \n"[j==n]);
                        else
                            printf("%lld%c",mid+j-1," \n"[j==n]);
                    }
                }
                return 0;
            }
            if(tmp>sum)r=mid-1;
            else l=mid+1;
        }
    }

    return 0;
}

/*_________________________________________________________end*/