#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ch;
  long long sum = 0;
  multiset<int> sett;
  multiset<int> ans;
  cin >> n;
  vector<int> num(n + 1, 0);
  for (int i = 1; i <= n; i++) {
    cin >> ch;
    num[i] = ch;
    sett.insert(ch);
    sum += ch;
  }
  for (int i = 1; i <= sett.size(); i++) {
    sett.erase(sett.find(num[i]));
    if (sum - num[i] - (*sett.rbegin()) == (*sett.rbegin())) ans.insert(i);
    sett.insert(num[i]);
  }
  cout << ans.size() << endl;
  for (auto it = ans.begin(); it != ans.end(); it++) cout << *it << " ";
  return 0;
}
