#include <bits/stdc++.h>
using namespace std;
static int n;
static vector<long long> ve;
static multiset<long long> s;
static vector<int> ans;
int main() {
  while (scanf("%d", &n) != EOF) {
    s.clear();
    long long sum = 0;
    ve.clear();
    ve.resize(n);
    for (int i = 0; i < n; i++) {
      scanf("%I64d", &ve[i]);
      sum += ve[i];
      s.insert(ve[i]);
    }
    ans.clear();
    for (int i = 0; i < n; i++) {
      long long p = sum - ve[i];
      if (p % 2) continue;
      auto it1 = s.lower_bound(ve[i]);
      s.erase(it1);
      auto it2 = s.lower_bound(p / 2);
      if (it2 == s.end() || *it2 != p / 2) {
        s.insert(ve[i]);
        continue;
      }
      ans.push_back(i + 1);
      s.insert(ve[i]);
    }
    printf("%d\n", ans.size());
    for (auto& v : ans) printf("%d ", v);
    printf("\n");
  }
  return 0;
}
