#include <bits/stdc++.h>
int main(int argc, char const *argv[]) {
  int n;
  int numbers[1000000];
  std::cin >> n;
  long long int sum = 0;
  int biggest = 0, biggest_pos = -1;
  int sec_biggest = 0, sec_biggest_pos = -1;
  for (int i = 0; i < n; i++) {
    std::cin >> numbers[i];
    sum += numbers[i];
    if (numbers[i] > sec_biggest) {
      if (biggest_pos == -1) {
        biggest = numbers[i];
        biggest_pos = i;
        continue;
      }
      sec_biggest = numbers[i];
      sec_biggest_pos = i;
      if (sec_biggest > biggest) {
        int tmp = biggest;
        biggest = sec_biggest;
        sec_biggest = tmp;
        tmp = biggest_pos;
        biggest_pos = sec_biggest_pos;
        sec_biggest_pos = tmp;
      }
    }
  }
  int output[1000000];
  int output_cnt = 0;
  if (biggest_pos != sec_biggest_pos) {
    if (sum - biggest - sec_biggest == sec_biggest) {
      output[output_cnt++] = biggest_pos;
    }
  }
  for (int i = 0; i < n; i++) {
    if (i == biggest_pos) continue;
    if (sum - numbers[i] - biggest == biggest) {
      output[output_cnt++] = i;
    }
  }
  if (output_cnt == 0) {
    std::cout << 0 << std::endl;
    std::cout << std::endl;
  } else {
    std::cout << output_cnt << std::endl;
    for (int i = 0; i < output_cnt; i++) {
      if (i + 1 == output_cnt) {
        std::cout << output[i] + 1 << std::endl;
      } else {
        std::cout << output[i] + 1 << ' ';
      }
    }
  }
  return 0;
}
