#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  int n;
  cin >> n;
  long long a[n + 1];
  for (int i = 1; i <= n; i++) cin >> a[i];
  map<long long, vector<int>> mp;
  long long S = 0;
  for (int i = 1; i <= n; i++) S += a[i];
  for (int i = 1; i <= n; i++) mp[a[i] + a[i] - S].emplace_back(i);
  vector<int> ans;
  for (int i = 1; i <= n; i++) {
    if (mp[-a[i]].size() == 1) {
      if (mp[-a[i]][0] != i) {
        ans.emplace_back(i);
      }
    } else if (mp[-a[i]].size()) {
      ans.emplace_back(i);
    }
  }
  cout << ans.size() << endl;
  random_shuffle(ans.begin(), ans.end());
  for (int i : ans) cout << i << ' ';
  cout << endl;
}
