#include <bits/stdc++.h>
using namespace std;
int n, a[1000000], s[10000000];
int main() {
  long long sum = 0, b = -1, c = -1;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    sum += s[i];
    if (s[i] > c) {
      b = c;
      c = s[i];
    } else if (s[i] > b)
      b = s[i];
  }
  int k = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == c) {
      if (sum - c - b == b) a[k++] = i;
    } else {
      if (sum - s[i] - c == c) a[k++] = i;
    }
  }
  cout << k << endl;
  for (int i = 0; i < k; i++) {
    cout << a[i] + 1 << " ";
  }
  return 0;
}
