#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  pair<long long int, long long int> a[n];
  int i, x;
  for (i = 0; i < n; i++) {
    cin >> x;
    a[i].first = x;
    a[i].second = i;
  }
  sort(a, a + n);
  long long int sum = 0;
  long long int b[n];
  for (i = 0; i < n; i++) {
    sum += a[i].first;
    b[i] = sum;
  }
  vector<int> j;
  for (i = 0; i < n - 1; i++) {
    if (b[n - 2] - a[n - 1].first == a[i].first) j.push_back(a[i].second);
  }
  if (b[n - 3] == a[n - 2].first) j.push_back(a[n - 1].second);
  cout << j.size() << endl;
  for (i = 0; i < j.size(); i++) cout << j[i] + 1 << " ";
}
