#include using namespace std; typedef unsigned int uint; typedef long long int ll; typedef unsigned long long int ull; #define debugv(v) printf("L%d %s => ",__LINE__,#v);for(auto e:v){cout< ",__LINE__,#m);for(int x=0;x<(w);x++){cout<<(m)[x]<<" ";}cout<>=1,k++)s=(s<<1)|(u&1);for(;0>=1)cout<<(s&1);}} #define TIME chrono::system_clock::now() #define MILLISEC(t) (chrono::duration_cast(t).count()) template ostream& operator <<(ostream &o,const pair p){o<<"("< range(l,h); return range(mt); } ll data[100010]; ll result[100010]; void fail(){ cout << -1 << endl; exit(0); } int main(){ int i,j,k; ll x,y,a,b; cin >> n; b = 0; for (i=0;i high){ fail(); } } //printf("low:%lld high:%lld\n",low,high);cout.flush(); b = low; result[n] = b; for (i=n-1;0<=i;i--){ if (i%2==0){ b = result[i] = (data[i]-b); }else{ b = result[i] = (b+data[i]); } //cout<