a[9999],n,j;main(){for(;~scanf("%d",a+n);n++);for(;--n>3;)a[n-2]+=a[n];for(printf("%d\n",n=a[3]?2:!!a[2]);j++<=n;printf("%d ",a[j]));}