#include <bits/stdc++.h>

using namespace std;

#define DBG cerr << '!' << endl;
#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define rep(i,s,g) for(ll (i) = (s);(i) < (g);++i)
#define rrep(i,s,g) for(ll (i) = (s);i >= (g);--(i))
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {for(int W = 0;W < (n);W++)cerr << v[W] << ' ';cerr << endl << endl;}
#define SHOW2d(v,i,j) {for(int aaa = 0;aaa < i;aaa++){for(int bbb = 0;bbb < j;bbb++)cerr << v[aaa][bbb] << ' ';cerr << endl;}cerr << endl;}
#define ALL(v) v.begin(),v.end()
#define Decimal fixed<<setprecision(10)
#define INF 1000000000
#define MOD 1000000007

typedef long long ll;
typedef pair<ll,ll> P;

int main()
{
	
	int mai = 0;
	bool maiiti = false;
	bool flag = false;
	int n;cin >> n;
	vector<ll> v(n);
	
	REP(i,n){
		cin >> v[i];
		if(v[i] == -1){
			maiiti = true;
		}
		else if(v[i] == -2){
			mai++;
		}
	}
	
	if(mai % 2 == 1){
		if(maiiti == true){
			flag = true;
		}
		else{
			mai--;
		}
	}
	
	vector<int> ret;
	
	REP(i,n){
		if(v[i] == -1){
			if(flag){
				flag = false;
				ret.PB(i);
			}
		}
		else if(v[i] == -2){
			if(mai > 0){
				mai--;
				ret.PB(i);
			}
		}
		else if(v[i] == 2){
			ret.PB(i);
		}
	}
	
	cout << ret.size() << endl;
	REP(i,ret.size()){
		cout << ret[i]+1 << endl;
	}
	
		
	
	return 0;
}
