#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int arr[N];
int maze[N];
int sa[N];
bool cmp(int a, int b) { return arr[a] < arr[b]; }
int main() {
  int n;
  long long sum = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
    sum += arr[i];
    maze[i] = i;
  }
  int tot = 0;
  sort(maze + 1, maze + 1 + n, cmp);
  for (int i = 1; i < n; i++)
    if (sum - arr[maze[i]] == 1ll * arr[maze[n]] * 2) sa[tot++] = maze[i];
  if (sum - arr[maze[n]] == 1ll * arr[maze[n - 1]] * 2) sa[tot++] = maze[n];
  printf("%d\n", tot);
  for (int i = 0; i < tot; i++) printf("%d ", sa[i]);
  printf("\n");
  return 0;
}
