#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k, x, y, m, flag = 0, r = 0, p = 0, q = 0, l = 0, z = 0, sum = 0,
                           i, j, k1, k2, k3, k4, t;
  cin >> n;
  long long a[n], b[n];
  vector<long> v;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (i = 0; i < n; i++) {
    sum += a[i];
    b[i] = a[i];
  }
  sort(b, b + n);
  for (i = 0; i < n; i++) {
    if (b[n - 1] == a[i]) {
      if (sum - a[i] == 2 * b[n - 2]) {
        v.push_back(i + 1);
      }
    } else {
      if (sum - a[i] == 2 * b[n - 1]) {
        v.push_back(i + 1);
      }
    }
  }
  cout << v.size() << endl;
  for (i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  return 0;
}
