#include #include #include int main() { long i, j, k; long ans[3]; long count = 0; std::string str; std::vector v; long temp; long D; std::cin >> D; for(i = 0; i < D+1; i++) { std::cin >> temp; v.push_back(temp); } ans[0] = v[0]; ans[1] = 0; for(i = 1; i < D+1; i+=2) { ans[1] += v[i]; } ans[2] = 0; for(i = 2; i < D+1; i+=2) { ans[2] += v[i]; } if(ans[2] != 0) { std::cout << 2 << std::endl; std::cout << ans[0] << " " << ans[1] << " " << ans[2] << std::endl; return 0; } if(ans[1] != 0) { std::cout << 1 << std::endl; std::cout << ans[0] << " " << ans[1] << std::endl; return 0; } if(ans[0] != 0) { std::cout << 0 << std::endl; std::cout << ans[0] << std::endl; return 0; } std::cout << 0 << std::endl; std::cout << 0 << std::endl; return 0; }