#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)   FOR(i,0,n)
#define pb emplace_back
typedef long long ll;
typedef pair<ll,ll> pint;

int a[61];
int main(){
    int n;
    cin>>n;
    int mx=-1000100010,cnt=0,cur=0;
    int c=-1,c1=0;
    rep(i,n){
        cin>>a[i];
        if(a[i]<0){
            ++cnt;
            if(mx<=a[i]) mx=a[i],cur=i;
            if(a[i]==-1) c=c==-1?i:c,++c1;
        }
    }
    if(cnt%2==0) cur=-1;
    if(c1>0){
        if((cnt-c1)%2==0) c=-1;
    }
    vector<int> v;
    rep(i,n){
        if(a[i]>=2) v.pb(i+1);
        if(c1==0&&a[i]<0&&cur!=i) v.pb(i+1);
        else if(c1>0&&c==-1&&a[i]<-1) v.pb(i+1);
        else if(c1>0&&(a[i]<-1||c==i)) v.pb(i+1);
    }
    cout<<v.size()<<endl;
    for(auto it:v) cout<<it<<endl;
    return 0;
}
