#include <bits/stdc++.h>
using namespace std;
struct node {
  int val, pos;
} a[201000];
int cmp(node x, node y) { return x.val < y.val; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int i, j, n;
  cin >> n;
  long long sum = 0;
  for (i = 1; i <= n; i++) {
    cin >> a[i].val;
    a[i].pos = i;
    sum += a[i].val;
  }
  sort(a + 1, a + n + 1, cmp);
  long long ans = 0, tmax;
  vector<int> vc;
  for (i = 1; i <= n; i++) {
    ans = sum - a[i].val;
    if (i != n) {
      tmax = a[n].val;
    } else
      tmax = a[n - 1].val;
    if (tmax == ans - tmax) {
      vc.push_back(a[i].pos);
    }
  }
  cout << vc.size() << endl;
  for (i = 0; i < vc.size(); i++) {
    cout << vc[i] << " ";
  }
  cout << endl;
  return 0;
}
