#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int n, a[100], P, Q, R; vector<int>S[5];
long long maxn = -(1LL << 60); vector<int>maxid;

int main() {
	cin >> n;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
		S[a[i] + 2].push_back(i);
	}
	for (int i = 0; i <= S[0].size(); i++) {
		for (int j = 0; j <= S[1].size(); j++) {
			for (int k = 0; k <= S[2].size(); k++) {
				for (int l = 0; l <= S[3].size(); l++) {
					for (int m = 0; m <= S[4].size(); m++) {
						long long ret = 1; vector<int>A;
						for (int p = 0; p < i; p++) { ret *= -2; A.push_back(S[0][p]); }
						for (int p = 0; p < j; p++) { ret *= -1; A.push_back(S[1][p]); }
						for (int p = 0; p < k; p++) { ret *= 0; A.push_back(S[2][p]); }
						for (int p = 0; p < l; p++) { ret *= 1; A.push_back(S[3][p]); }
						for (int p = 0; p < m; p++) { ret *= 2; A.push_back(S[4][p]); }
						sort(A.begin(), A.end());
						if (ret > maxn) {
							maxn = ret;
							maxid = A;
						}
						else if (ret == maxn) {
							if (A.size() < maxid.size()) maxid = A;
							else if (A.size() == maxid.size() && A < maxid) maxid = A;
						}
					}
				}
			}
		}
	}
	cout << maxid.size() << endl;
	for (int i = 0; i < maxid.size(); i++) cout << maxid[i] << endl;
	return 0;
}
