#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, sum = 0;
  cin >> n;
  vector<pair<long long, long long>> v;
  vector<long long> ans;
  for (int i = 0; i < n; i++) {
    long long k;
    cin >> k;
    v.push_back(make_pair(k, i + 1));
    sum += k;
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < n - 1; i++) {
    if (v[n - 1].first == sum - v[i].first - v[n - 1].first) {
      ans.push_back(v[i].second);
    }
  }
  if (n > 1 && v[n - 2].first == sum - v[n - 1].first - v[n - 2].first) {
    ans.push_back(v[n - 1].second);
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << ' ';
  }
}
