#include <bits/stdc++.h>
using namespace std;
int main() {
  int count;
  cin >> count;
  int result = 0;
  std::uint64_t max = 0;
  std::vector<std::pair<int, int>> arr;
  std::vector<int> arr_result;
  for (int i = 0; i < count; i++) {
    int value = 0;
    cin >> value;
    max += value;
    arr.push_back(make_pair(value, i + 1));
  }
  if (arr.size() >= 3) {
    std::sort(arr.begin(), arr.end(),
              [](const std::pair<int, int>& l, const std::pair<int, int>& p) {
                return l.first > p.first;
              });
    for (int i = 0; i < arr.size(); i++) {
      std::uint64_t c_max = max - arr[i].first;
      if ((c_max % 2 == 0) &&
          (i == 0 ? arr[1].first : arr[0].first) == c_max / 2) {
        result += 1;
        arr_result.push_back(arr[i].second);
      }
    }
  }
  cout << result << endl;
  if (result != 0)
    for (const auto& iter : arr_result) cout << iter << " ";
  return 0;
}
