1
2
3
4
5
6
#include<cstdio> 
#define s std::scanf
#define p std::printf
#define r return 0
#define t "%d\n2\n1 2\n"
int i,n,l,k;main(){s("%d",&n);for(;i++<n;){s("%d",&k);if(k<2){if(l){p(t,0);r;}l=i;}}if(l){p(t,1);r;}p(t,2);}