#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int a[n];
for(int i=0;i<n;i++){
cin >> a[i];
}
int b[n];
int S=0;
b[0]=a[0];
for(int i=1;i<n;i++){
S+=a[i-1];
b[i]=S;
}
for(int i=0;i<n;i++){
printf(" %d ", b[i]);
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmludCBtYWluKCkgewoJaW50IG47CgljaW4gPj4gbjsKCWludCBhW25dOwoJZm9yKGludCBpPTA7aTxuO2krKyl7CgkJY2luID4+IGFbaV07Cgl9CglpbnQgYltuXTsKCWludCBTPTA7CgliWzBdPWFbMF07Cglmb3IoaW50IGk9MTtpPG47aSsrKXsKCQlTKz1hW2ktMV07CgkJYltpXT1TOwoJfQoJZm9yKGludCBpPTA7aTxuO2krKyl7CQoJCXByaW50ZigiICVkICIsIGJbaV0pOwoJfQoJcmV0dXJuIDA7Cn0=