#include <bits/stdc++.h>
using namespace std;
pair<long long int, long long int> a[200005];
int main() {
  long long int n, y = 0, x, s = 0, i, z;
  cin >> n;
  map<long long int, long long int> mp, mpp;
  vector<long long int> v;
  for (i = 0; i < n; i++) {
    cin >> a[i].first;
    s += a[i].first;
    a[i].second = i + 1;
  }
  sort(a, a + n);
  for (i = 0; i < n; i++) {
    if (i != n - 1) {
      if (a[n - 1].first == s - a[n - 1].first - a[i].first) {
        v.push_back(a[i].second);
      }
    } else {
      if (a[n - 2].first == s - a[n - 2].first - a[n - 1].first) {
        v.push_back(a[n - 1].second);
      }
    }
  }
  cout << v.size() << endl;
  for (i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  return 0;
}
