#include <bits/stdc++.h>
using namespace std;
long long a[200000];
struct B {
  long long S, W;
};
B b[200000];
long long d[200000];
bool operator<(const B &a1, const B &a2) {
  if (a1.S < a2.S) return true;
  return false;
}
int main() {
  long long n, he = 0, c = 0;
  cin >> n;
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
    he += a[i];
    b[i].S = a[i];
    b[i].W = i + 1;
  }
  sort(b, b + n);
  for (long long i = n - 1; i >= 0; --i) {
    he -= b[i].S;
    if ((!(he & 1)) && he == b[n - 2].S * 2 && i == n - 1) {
      d[c++] = b[i].W;
    }
    if ((!(he & 1)) && he == b[n - 1].S * 2 && i != n - 1) {
      d[c++] = b[i].W;
    }
    he += b[i].S;
  }
  if (c != 0) {
    printf("%lld\n", c);
    for (long long i = 0; i < c; ++i) {
      if (i)
        printf(" %lld", d[i]);
      else
        printf("%lld", d[i]);
    }
  } else
    printf("0");
  return 0;
}
