#include <bits/stdc++.h>
using namespace std;
long long mult(long long a, long long b, long long p = 1000000007) {
  return ((a % p) * (b % p)) % p;
}
long long add(long long a, long long b, long long p = 1000000007) {
  return (a % p + b % p) % p;
}
long long fpow(long long n, long long k, long long p = 1000000007) {
  long long r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
  }
  return r;
}
long long inv(long long a, long long p = 1000000007) {
  return fpow(a, p - 2, p);
}
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  vector<int> arr(n);
  unordered_multiset<int> ele;
  long long sum = 0;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    ele.insert(arr[i]);
    sum += arr[i];
  }
  vector<int> ans;
  for (int i = 0; i < n; ++i) {
    long long newsum = sum - arr[i];
    if (newsum % 2) continue;
    auto it = ele.find(arr[i]);
    ele.erase(it);
    long long divs = newsum / 2;
    if (divs > 1000000) continue;
    auto iter = ele.find((int)(divs));
    if (iter != ele.end()) ans.push_back(i + 1);
    ele.insert(arr[i]);
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
