#include #include #include #include #include #include #include #include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define req(i,n) for(int i = 1;i <= n; i++) #define rrep(i,n) for(ll i = n-1;i >= 0;i--) #define ALL(obj) begin(obj), end(obj) #define RALL(a) rbegin(a),rend(a) typedef long long ll; typedef long double ld; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } const ll INF = 1e18; ll mod = 1e9 + 7; int main() { int n; cin >> n; vector a(n+1); ll sum = 0,cnt=0; rep(i, n+1) { cin >> a[i]; sum += a[i]; if (i % 2) cnt -= a[i]; else cnt += a[i]; }ll A = (sum + cnt) / 2 - a[0]; ll B = (sum - cnt) / 2, C = a[0]; if (A == 0) { if (B == 0) { cout << 0 << endl << C << endl; } else { cout << 1 << endl; cout << C << " " << B << endl; } } else { cout << 2 << endl; cout << C << " " << B << " " << A << endl; } }