#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, k = 0, total = 0;
  cin >> n;
  long long int r[n + 1], sum = 0;
  map<long long int, long long int> mp;
  vector<long long int> V;
  vector<long long int>::iterator j;
  for (i = 1; i <= n; i++) {
    cin >> r[i];
    sum = sum + r[i];
    mp[r[i]] += 1;
  }
  for (i = 1; i <= n; i++) {
    mp[r[i]]--;
    if ((sum - r[i]) % 2 == 0 && mp[(sum - r[i]) / 2] != 0) {
      V.push_back(i);
      total++;
    }
    mp[r[i]]++;
  }
  cout << total << endl;
  if (total != 0) {
    for (j = V.begin(); j != V.end(); j++) {
      cout << *j << " ";
    }
  }
  return 0;
}
