// iostream is too mainstream
#include <cstdio>
// bitch please
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <cmath>
#include <iomanip>
#define dibs reserve
#define OVER9000 1234567890
#define patkan 9
#define tisic 47
#define soclose 1e-9
#define pi 3.1415926535898
#define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
#define chocolate win
#define ff first
#define ss second
#define abs(x) ((x < 0)?-(x):(x))
#define uint unsigned int
#include <time.h>
// mylittlepony
using namespace std;
int main() {
// freopen("fcount.in","r",stdin);
// freopen("fcount.out","w",stdout);
int N;
scanf(" %d",&N);
vector< pair<int,int> > A(N+1);
for(int i =0; i <= N; i++) {
scanf(" %d",&A[i].ff);
A[i].ss =i;}
sort(A.begin(),A.end());
vector<int> ans;
for(int i =0; i <= N; i++) {
bool b =true;
vector<int> B;
for(int j =0; j < i; j++) B.push_back(A[j].ff);
for(int j =i+1; j <= N; j++) B.push_back(A[j].ff);
reverse(B.begin(),B.end());
long long S =0;
for(int j =0; j < N; j++) {
S +=B[j];
long long K =j*(j+1);
for(int k =j+1; k < N; k++) K +=min(j+1,B[k]);
if(S > K) {
b =false;
break;}}
if(S%2 != 0) b =false;
if(b) ans.push_back(A[i].ss);}
sort(ans.begin(),ans.end());
printf("%d\n",ans.size());
for(uint i =0; i < ans.size(); i++) printf("%d\n",ans[i]+1);
return 0;}
// look at my code
// my code is amazing
Ly8gaW9zdHJlYW0gaXMgdG9vIG1haW5zdHJlYW0KI2luY2x1ZGUgPGNzdGRpbz4KLy8gYml0Y2ggcGxlYXNlCiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPHNldD4KI2luY2x1ZGUgPG1hcD4KI2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPHF1ZXVlPgojaW5jbHVkZSA8c3RhY2s+CiNpbmNsdWRlIDxhbGdvcml0aG0+Ci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