#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6;
const int INF = ~0U >> 2;
int n, a[200001];
int main() {
  scanf("%d", &n);
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    sum += a[i];
  }
  if (sum % n != 0) {
    puts("0");
    return 0;
  }
  sum /= n;
  int cnt = 0;
  for (int i = 1; i <= n; i++)
    if (a[i] == sum) cnt++;
  printf("%d\n", cnt);
  int j = 0;
  for (int i = 1; i <= n; i++)
    if (a[i] == sum) {
      printf("%d", i);
      if (++j == cnt)
        puts("");
      else
        printf(" ");
    }
  return 0;
}
