#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> v(n), v1(n);
  long long int second = 0;
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
    v1[i] = v[i];
    second += v[i];
  }
  sort(v1.begin(), v1.end());
  vector<int> a;
  for (int i = 0; i < n; ++i) {
    long long int sum = second - v[i];
    if (sum % 2) continue;
    if (v[i] == v1[n - 1]) {
      if (v1[n - 2] == sum / 2) a.push_back(i + 1);
    } else {
      if (v1[n - 1] == sum / 2) a.push_back(i + 1);
    }
  }
  cout << a.size() << "\n";
  for (int i = 0; i < a.size(); ++i) {
    cout << a[i] << " ";
  }
  cout << "\n";
  return 0;
}
