#include <bits/stdc++.h>
using namespace std;
const int N = 2 * 1e5 + 5;
long long n, a[N], sum;
vector<int> ans;
map<long long, int> freq;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
    freq[a[i]]++;
  }
  for (int i = 0; i < n; i++) {
    long long s = sum - a[i];
    if (s % 2 == 0) {
      if (s / 2 == a[i] && freq[s / 2] < 2) continue;
      if (freq[s / 2]) ans.push_back(i + 1);
    }
  }
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
