#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long a[n];
  long long sum = 0;
  multiset<long long> s;
  std::vector<pair<long long, long long> > vv;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    vv.push_back(make_pair(a[i], i + 1));
    sum += a[i];
  }
  vector<long long> ans;
  stable_sort(vv.begin(), vv.end());
  for (long long i = 0; i < n; i++) {
    long long ps = sum - vv[i].first;
    if (i == n - 1) {
      if (ps - vv[n - 2].first == vv[n - 2].first) {
        ans.push_back(vv[i].second);
      }
    } else {
      if (ps - vv[n - 1].first == vv[n - 1].first) {
        ans.push_back(vv[i].second);
      }
    }
  }
  cout << ans.size() << endl;
  for (long long i = 0; i < ans.size(); i++) cout << ans[i] << " ";
}
