#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int N = 200500;
void solve() {
  int n;
  cin >> n;
  vector<long long> a(n + 1);
  for (int quer = 1; quer < n + 1; quer++) cin >> a[quer];
  map<long long, pair<int, int> > m;
  long long sum = 0;
  for (int i = 1; i <= n; i++) {
    m[a[i]] = {i, m[a[i]].second + 1};
    sum += a[i];
  }
  vector<int> ans;
  for (int i = 1; i <= n; i++) {
    long long t = sum - a[i];
    if (t % 2 == 0) {
      if (m[t / 2].first > 0 && (m[t / 2].first != i || m[t / 2].second > 1)) {
        ans.push_back(i);
      }
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << ' ';
}
int main() {
  ios::sync_with_stdio(false);
  int q = 1;
  for (int i = 1; i <= q; i++) {
    solve();
  }
}
