#include <bits/stdc++.h>
using namespace std;
int a[200005];
vector<int> ans;
int main() {
  int n, maxx = 0, cnt = 0, now = 0;
  long long sum = 0;
  bool flag = 0, flag1 = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
    if (maxx < a[i]) {
      maxx = a[i];
      now = i;
    }
  }
  sum -= maxx;
  int max2 = 0;
  for (int i = 1; i <= n; i++) {
    if (now != i) {
      max2 = max(max2, a[i]);
      if (sum - a[i] == maxx) ans.push_back(i);
    }
  }
  if (sum - max2 == max2) ans.push_back(now);
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
