#include <bits/stdc++.h>
const double PI = 3.141592653589793238460;
using namespace std;
void solve() {
  long long n;
  cin >> n;
  long long arr[n + 1];
  long long sum = 0;
  map<long long, long long> mp;
  map<long long, long long> ind;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
    sum += arr[i];
    mp[arr[i]]++;
  }
  vector<long long> v;
  for (int i = 1; i <= n; i++) {
    long long num = sum - arr[i];
    mp[arr[i]]--;
    if (mp[num / 2] > 0 and num % 2 == 0) v.push_back(i);
    mp[arr[i]]++;
  }
  cout << v.size() << '\n';
  for (auto x : v) cout << x << " ";
  cout << '\n';
}
int main() {
  int T = 1;
  while (T--) solve();
}
