#include <bits/stdc++.h>
using namespace std;
struct shu {
  int d;
  int m;
  long long int s;
} a[200005];
bool cmp(shu a, shu b) { return a.d > b.d; }
int main() {
  vector<int> v;
  int i, j, n, m;
  cin >> n;
  long long int sum = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i].d;
    a[i].m = i + 1;
    sum += a[i].d;
  }
  for (i = 0; i < n; i++) {
    a[i].s = sum - a[i].d;
  }
  sort(a, a + n, cmp);
  if (a[0].s % 2 == 0 && a[0].s / 2 == a[0].s - a[1].d) v.push_back(a[0].m);
  int k = 1;
  while (k < n) {
    if (a[k].s % 2 == 0 && a[k].s / 2 == a[k].s - a[0].d) v.push_back(a[k].m);
    k++;
  }
  if (v.size() == 0)
    cout << 0 << endl << endl;
  else
    cout << v.size() << endl;
  for (i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
}
