#include <bits/stdc++.h>
using namespace std;
inline void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
int main() {
  fast();
  bool flag = true;
  while (flag) {
    flag = false;
    long long n;
    cin >> n;
    vector<pair<long long, long long> > v;
    long long sum = 0;
    for (long long i = 1; i <= n; i++) {
      long long t;
      cin >> t;
      sum += t;
      v.push_back(make_pair(t, i));
    }
    sort(v.begin(), v.end());
    vector<long long> goodIndices;
    for (long long i = 0; i < v.size(); i++) {
      long long ind = v[i].second;
      long long val = v[i].first;
      long long sum1 = sum - val;
      if (i == v.size() - 1) {
        long long sum2 = sum1 - v[v.size() - 2].first;
        if (sum2 == v[v.size() - 2].first) goodIndices.push_back(ind);
        continue;
      }
      long long sum2 = sum1 - v[v.size() - 1].first;
      if (sum2 == v[v.size() - 1].first) {
        goodIndices.push_back(ind);
      }
    }
    sort(goodIndices.begin(), goodIndices.end());
    cout << goodIndices.size() << endl;
    for (long long i = 0; i < goodIndices.size(); i++)
      cout << goodIndices[i] << " ";
    cout << endl;
  }
}
