#include <bits/stdc++.h>
using ll = long long;
int main() {
  std::ios_base::sync_with_stdio(0);
  std::cin.tie(0);
  int n;
  std::cin >> n;
  std::vector<std::pair<ll, int>> vec(n);
  ll sum = 0;
  for (int i = 0; i < n; ++i) {
    ll x;
    std::cin >> x;
    vec[i] = {x, i + 1};
    sum += x;
  }
  std::vector<int> ans;
  std::sort(vec.begin(), vec.end());
  sum -= vec[n - 1].first;
  for (int i = 0; i < n - 1; ++i) {
    if (sum - vec[i].first == vec[n - 1].first) {
      ans.push_back(vec[i].second);
    }
  }
  sum -= vec[n - 2].first;
  if (vec[n - 2].first == sum) {
    ans.push_back(vec[n - 1].second);
  }
  std::cout << (int)ans.size() << "\n";
  for (int i = 0; i < (int)ans.size(); ++i) {
    std::cout << ans[i] << " ";
  }
  std::cout << "\n";
}
