#include <bits/stdc++.h>
using namespace std;
const int maxn = 200010;
int n, max1, max2, a[maxn], b[maxn], num, t;
long long sum;
int main() {
  while (scanf("%d", &n) != EOF) {
    sum = 0;
    max1 = -1, max2 = -1, num = 0, t = 0;
    int j, k;
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
      sum += a[i];
      if (max1 <= a[i]) {
        max2 = max1;
        max1 = a[i];
        j = i;
      } else if (max2 <= a[i]) {
        max2 = a[i];
      }
    }
    for (int i = 0; i < n; i++) {
      if (a[i] == sum - max1 - max1 && i != j) {
        b[t] = i + 1;
        t++;
      }
    }
    if (sum - max1 - max2 == max2) {
      b[t] = j + 1;
      t++;
    }
    if (t == 0)
      printf("0\n");
    else {
      int flag = 0;
      printf("%d\n", t);
      for (int i = 0; i < t; i++) {
        if (flag) printf(" ");
        printf("%d", b[i]);
        flag = 1;
      }
      printf("\n");
    }
  }
  return 0;
}
