#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; long long MOD = 1000000007; int main() { int D; cin >> D; vector A(D+1); for ( int i = 0; i <= D; i++ ) { cin >> A[i]; } int f0 = A[0]; int f1 = 0, f2 = 0; for ( int i = 0; i <= D; i++ ) { f2 += ( i%2 ) ? -A[i] : A[i]; f1 += A[i]; } // cout << f1 << " " << f2 << endl; int ans[3]; ans[0] = f0; ans[1] = (f1-f2)/2; ans[2] = f1-(ans[1]+ans[0]); int d = 0; for ( int i = 1; i < 3; i++ ) { if ( ans[i] != 0 ) { d = i; } } cout << d << endl; for ( int i = 0; i < d+1; i++ ) { if ( i ) { cout << " "; } cout << ans[i]; } cout << endl; return 0; }