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