#include #define REP(i,n,N) for(int i=(n);i<(int) N;i++) using namespace std; int main(void){ int d; cin >> d; vector b(d + 1); REP(i,0, d + 1) cin >> b[i]; reverse(b.begin(),b.end()); REP(i,0, d - 2){ b[i + 2] += b[i]; } if(b[d - 2] != 0 && d - 2 >= 0){ printf("2\n"); printf("%d %d %d\n", b[d], b[d - 1], b[d - 2]); }else if(b[d - 1] != 0 && d - 1 >= 0){ printf("1\n"); printf("%d %d\n", b[d], b[d - 1]); }else{ printf("0\n"); printf("%d\n", b[d]); } return 0; }