#include <bits/stdc++.h>
using namespace std;
ostream& operator<<(ostream& os, const vector<long long>& a) {
  for (long long i = 0; i < a.size(); ++i) {
    os << a[i] << ' ';
  }
  return os;
}
bool res[200005];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> a(n);
  long long sum = 0, ma1 = 0, ma2 = 0, ima1, ima2;
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
    sum += a[i];
    if (a[i] > ma1) {
      ma2 = ma1;
      ima2 = ima1;
      ma1 = a[i];
      ima1 = i;
      continue;
    }
    if (a[i] > ma2) {
      ma2 = a[i];
      ima2 = i;
    }
  }
  long long c = 0;
  for (long long i = 0; i < n; ++i) {
    if ((ma1 == sum - ma1 - a[i] && ima1 != i) ||
        (ma2 == sum - ma2 - a[i] && ima2 != i)) {
      res[i + 1] = true;
      c++;
    }
  }
  long long ci = 0, i = 0;
  cout << c << endl;
  while (ci < c) {
    if (res[i]) {
      cout << i << ' ';
      ci++;
    }
    i++;
  }
  return 0;
}
