#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long>> v;
long long n, m;
bool ch(long long q) {
  bool ansf = false;
  if (v[0].first != 1) {
    if (q - v[0].second <= v[0].first - 1) {
      ansf = true;
    }
  }
  for (long long i = 1; i < m; i++) {
    if (q - v[i].second + v[i + 1].second - q <= v[i + 1].first - v[i].first) {
      ansf = true;
    } else {
      if (v[i + 1].first - v[i].first < abs(v[i + 1].second - v[i].second)) {
        cout << "IMPOSSIBLE";
        return 0;
      }
    }
  }
  if (v[m - 1].first != n) {
    if (q - v[m - 1].second <= v[m - 1].first - n) {
      ansf = true;
    }
  }
  return ansf;
}
signed main() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  long long sum = 0;
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
    sum += v[i];
  }
  for (long long i = 0; i < n; i++) {
    mp[2 * v[i]]++;
  }
  vector<long long> ans;
  for (long long i = 0; i < n; i++) {
    if (mp[sum - v[i]] != 0 && ((sum - v[i] != v[i] * 2) ||
                                (sum - v[i] == v[i] * 2 && mp[v[i] * 2] > 1))) {
      ans.push_back(i + 1);
    }
  }
  cout << ans.size() << endl;
  for (long long i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
}
