#include <bits/stdc++.h>
using namespace std;
map<long long, int> mp;
int main() {
  int n;
  cin >> n;
  pair<long long, int> a[n];
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    sum += a[i].first;
    a[i].second = i + 1;
  }
  sort(a, a + n);
  vector<int> ans;
  for (int i = 0; i < n - 1; i++) {
    long long nowsum = sum - a[i].first - a[n - 1].first;
    if (nowsum == a[n - 1].first) {
      ans.push_back(a[i].second);
    }
  }
  if ((sum - a[n - 1].first - a[n - 2].first) == a[n - 2].first) {
    ans.push_back(a[n - 1].second);
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
}
