#include using namespace std; using ll=long long; const ll inf=1LL<<60; ll a[100001],b[100000]; int main(void){ int n; cin >> n; for(int i=0;i> b[i]; ll low=1LL,high=inf; for(int i=0;ihigh){ puts("-1"); return 0; } a[n]=low; for(int i=n-1;i>=0;--i){ if(i%2) a[i]=b[i]+a[i+1]; else a[i]=b[i]-a[i+1]; } cout << n+1 << endl; for(int i=0;i<=n;++i) cout << a[i] << endl; return 0; }