#include "bits/stdc++.h" #define REP(i,n,N) for(ll i=(n); i<(N); i++) #define RREP(i,n,N) for(ll i=(N-1); i>=n; i--) #define CK(n,a,b) ((a)<=(n)&&(n)<(b)) #define ALL(v) (v).begin(),(v).end() #define p(s) cout<<(s)<>D; REP(i,0,D+1){ cin>>a[i]; } RREP(i,3,D+1){ a[i-2]+=a[i]; a[i]=0; } int ansD=0; if(a[2]) ansD=2; else if(a[1]) ansD=1; p(ansD); REP(i,0,ansD+1){ if(i) cout<<" "<