#include<bits/stdc++.h>
using namespace std;
# define ll long long
# define read read1<ll>()
# define Type template<typename T>
Type T read1(){
	T t=0;
	char k;
	bool vis=0;
	do (k=getchar())=='-'&&(vis=1);while('0'>k||k>'9');
	while('0'<=k&&k<='9')t=(t<<3)+(t<<1)+(k^'0'),k=getchar();
	return vis?-t:t;
}
# define fre(k) freopen(k".in","r",stdin);freopen(k".out","w",stdout)
int a[200005],s;
int main(){
	s=read;int v=0;ll ans=0,t=0;
	for(int i=1;i<=s;++i)
		a[i]=read;
	for(int i=1;i<=s;++i){
		v=max(v,a[i]);t+=a[i];
		ans+=t;
		printf("%lld\n",ans+1ll*v*i);
	}
	return 0;
}

/*
#include <stdio.h>

int main(){
    int l,a,i,j;
    long long int ans = 1;
    scanf("%d", &l);
    a = (l-1) % 11;
    for(i = 1; i <= 11; i++){
        ans *= (l-i) / (11 - i - 1 + a);
    }
    printf("%lld", ans);
}
*/
#include <stdio.h>

long long combi(int, int);

int main() {
    int n, r = 11;
    scanf("%d", &n);
    n -= 1;
    printf("%lld\n", combi(n, r));
}

long long combi(int n, int r) {
    if (r == 0) {
        return 1;
    }
    
    return (n - r + 1) * combi(n, r - 1) / r;
}
