#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long sum = 0, sum1, a;
  vector<long long> v(n);
  vector<int> ans;
  map<long long, set<int> > mp;
  for (int i = 0; i < n; i++) {
    cin >> a;
    v[i] = a;
    sum += a;
    mp[a].insert(i);
  }
  for (int i = 0; i < n; i++) {
    sum1 = sum - v[i];
    if (sum1 % 2 == 0) {
      if (mp.find(sum1 / 2) != mp.end()) {
        if (mp[sum1 / 2].find(i) == mp[sum1 / 2].end() ||
            mp[sum1 / 2].size() > 1) {
          ans.push_back(i + 1);
        }
      }
    }
  }
  cout << ans.size() << endl;
  for (auto i : ans) {
    cout << i << " ";
  }
}
