#include <bits/stdc++.h>
using namespace std;
int n, cnt = 0;
long long sum = 0;
bool flag = false;
struct Node {
  int num;
  int pos;
} a[200005];
bool cmp(const Node &a, const Node &b) { return a.num < b.num; }
vector<int> v;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].num;
    a[i].pos = i;
    sum += a[i].num;
  }
  sort(a + 1, a + n + 1, cmp);
  for (int i = 1; i <= n - 1; i++) {
    if (sum - a[i].num == 2 * a[n].num) {
      cnt++;
      v.push_back(a[i].pos);
    }
  }
  if (sum - a[n].num == 2 * a[n - 1].num) {
    v.push_back(a[n].pos);
    cnt++;
  }
  if (cnt == 0) {
    cout << 0 << endl;
    return 0;
  }
  cout << cnt << endl;
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  return 0;
}
