1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include"bits/stdc++.h"
using namespace std;

#define debug if(0)
#define watch(x) debug cout << __LINE__ << ": " << (#x) << " is " << (x) << endl ;
#define watch_tab(x,n) debug { cout << __LINE__ << ": " << (#x) << " is "; \
    for(int very_long_index=0;very_long_index<n;very_long_index++){ cout << x[very_long_index] << ", ";}\
    cout << endl; }

typedef long long ll;
typedef unsigned long long ull;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int n,a,count=0;
    cin >> n;
    for (int i = 0; i < n; ++i) {
        cin >> a;
        if(a==1)++count;
    }
    cout << 2-min(2,count) << "\n2\n1 2";
}