#include <bits/stdc++.h>
using namespace std;
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t, n, i, j, m, k = 0;
  string s;
  cin >> n;
  long long a[n + 1], sum = 0;
  map<long long, long long> ma;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    sum += a[i];
    ma[a[i]]++;
  }
  vector<long long> v;
  long long temp;
  map<long long, long long>::iterator it;
  for (i = 1; i <= n; i++) {
    t = sum - a[i];
    temp = t % 2;
    if (temp) {
      continue;
    } else {
      ma[a[i]]--;
      k = t / 2;
      it = ma.find(k);
      if (it != ma.end() && it->second > 0) v.push_back(i);
      ma[a[i]]++;
    }
  }
  cout << v.size() << endl;
  for (i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
}
