#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cctype>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define MOD 1000000007
#define rep(i,n) for(i=0;i<(n);i++)
#define loop(i,a,n) for(i=a;i<(n);i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;

int main(void) {
  int i,j;
  int n;
  cin>>n;
  vi a(n);
  rep(i,n)cin>>a[i];
  int x=0,y=0,z=0;
  rep(i,n){
    if(a[i]==2)x++;
    if(a[i]==-2)y++;
    if(a[i]==-1)z++;
  }

  //  cout<<x<<" "<<y<<" "<<z<<endl;

  if(y%2==1){
    if(z){
      cout<<x+y+1<<endl;
      rep(i,n){
	if(a[i]==2 || a[i]==-2)cout<<i+1<<endl;
	if(a[i]==-1 && z){
	  cout<<i+1<<endl;
	  z=0;
	}
      }
    }else{
	cout<<x+y-1<<endl;
	rep(i,n){
	  if(a[i]==2)cout<<i+1<<endl;
	  if(a[i]==-2 && y-1>0){
	    cout<<i+1<<endl;
	    y--;
	  }
	}

    }

  }else{
    cout<<x+y<<endl;
    rep(i,n)if(a[i]==2 || a[i]==-2)cout<<i+1<<endl;

  }

}

