#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

int main() {
    int N; cin >> N;
    vector<int> a(N);
    vector<pii> minus;
    for(int i = 0; i < N; ++i) {
        cin >> a[i];
        if(a[i] < 0) {
            minus.emplace_back(a[i], i);
        }
    }
    sort(begin(minus), end(minus));
    vector<int> ans;
    while(minus.size() >= 2 && minus[0].first == -2) {
        ans.emplace_back(minus[0].second);
        ans.emplace_back(minus[1].second);
        minus.erase(minus.begin());
        minus.erase(minus.begin());
    }
    for(int i = 0; i < N; ++i) {
        if(a[i] == 2) {
            ans.emplace_back(i);
        }
    }
    sort(begin(ans), end(ans));
    cout << ans.size() << endl;
    for(auto x : ans) {
        cout << x + 1 << endl;
    }
}

