#include <bits/stdc++.h>
using namespace std;
const int maxN = 2e5 + 5;
int n, k = 0, ans[maxN], maxA;
long long sum = 0, res = 0;
struct T {
  int Value, id;
};
T a[maxN];
bool lf(const T& p, const T& q) {
  if (p.Value == q.Value) return p.id < q.id;
  return p.Value < q.Value;
}
bool Check(int x) {
  if ((sum - x) % 2 != 0) return false;
  long long NewValue = (sum - x) / 2;
  if (NewValue == maxA) return true;
  return false;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].Value;
    a[i].id = i;
    sum += (long long)a[i].Value;
  }
  sort(a + 1, a + n + 1, lf);
  maxA = a[n].Value;
  for (int i = 1; i <= n; i++) {
    if (i == n) {
      maxA = a[n - 1].Value;
    }
    if (Check(a[i].Value)) {
      res++;
      ans[k++] = a[i].id;
    }
  }
  cout << res << '\n';
  for (int i = 0; i < k; i++) cout << ans[i] << ' ';
}
