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