#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, sum = 0;
  cin >> n;
  long long int a, i;
  vector<pair<long long int, long long int>> v1;
  for (i = 0; i < n; ++i) {
    cin >> a;
    sum += a;
    v1.push_back(make_pair(a, i + 1));
  }
  sort(v1.begin(), v1.end());
  vector<long long int> v;
  for (i = 0; i < v1.size(); ++i) {
    if (i != v1.size() - 1) {
      if (v1[v1.size() - 1].first ==
          sum - v1[i].first - v1[v1.size() - 1].first)
        v.push_back(v1[i].second);
    } else {
      if (v1[v1.size() - 2].first ==
          sum - v1[i].first - v1[v1.size() - 2].first)
        v.push_back(v1[i].second);
    }
  }
  cout << (int)v.size() << endl;
  for (i = 0; i < v.size(); ++i) cout << v[i] << " ";
  return 0;
}
