#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 322;
const long long LINF = 2e18 + 474;
const long long MAXN = 2e5 + 5;
const long long MOD = 1e9 + 7;
const double eps = 1e-12;
long long n, s = 0;
pair<long long, long long> a[MAXN];
vector<long long> ans;
void solve() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    long long x;
    cin >> x;
    a[i] = make_pair(x, i);
    s += a[i].first;
  }
  sort(a, a + n);
  if (s - a[n - 1].first == 2 * a[n - 2].first) {
    ans.push_back(a[n - 1].second);
  }
  for (int i = n - 2; i >= 0; i--) {
    long long curs = s - a[i].first;
    if (curs == a[n - 1].first * 2) {
      ans.push_back(a[i].second);
    }
  }
  cout << (long long)ans.size() << endl;
  for (long long i = 0; i < (long long)ans.size(); i++) {
    cout << ans[i] + 1 << " ";
  }
}
int main() {
  if (!1) {
    freopen(
        "474"
        ".in",
        "r", stdin);
    freopen(
        "474"
        ".out",
        "w", stdout);
  }
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  setlocale(LC_ALL, "Russian");
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
