#include <bits/stdc++.h>
using namespace std;
const int N = 200 * 1000 + 5;
map<long long, long long> mp;
long long s, i;
vector<int> v;
int n, a[N], ans;
int main() {
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    s += a[i];
    mp[a[i]]++;
  }
  for (i = 0; i < n; i++)
    if ((s - a[i]) % 2 == 0 && mp[(s - a[i]) / 2] &&
        !(mp[(s - a[i]) / 2] == 1 && a[i] == ((s - a[i]) / 2))) {
      ans++;
      v.push_back(i);
    }
  cout << ans << endl;
  for (i = 0; i < v.size(); i++) cout << v[i] + 1 << " ";
  cout << endl;
  return 0;
}
