#include <bits/stdc++.h>
using namespace std;
const long long int M = 1000000007;
long long int power(long long int x, long long int n) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return (power((x * x) % M, n / 2)) % M;
  else
    return ((x % M) * power(x, n - 1) % M);
}
long long int ncr(int n, int r) {
  if (r > n) return 0;
  if (r > n - r) r = n - r;
  long long int ans = 1;
  int i;
  for (i = 1; i <= r; i++) {
    ans *= n - r + i;
    ans /= i;
  }
  return ans;
}
long long int nCrModpDP(long long int n, long long int r, long long int p) {
  long long int C[r + 1];
  memset(C, 0, sizeof(C));
  C[0] = 1;
  for (long long int i = 1; i <= n; i++) {
    for (long long int j = min(i, r); j > 0; j--) C[j] = (C[j] + C[j - 1]) % p;
  }
  return C[r];
}
long long int ncrmod(long long int n, long long int r, long long int p) {
  if (r == 0) return 1;
  long long int ni = n % p, ri = r % p;
  return (ncrmod(n / p, r / p, p) * nCrModpDP(ni, ri, p)) % p;
}
long long int modInverse(long long int a, long long int m) {
  long long int m0 = m;
  long long int y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long int q = a / m;
    long long int t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<long long int> num(n, 0);
  map<int, int> vec;
  long long int jum = 0;
  for (int i = 0; i < n; i++) {
    cin >> num[i];
    jum += num[i];
  }
  vector<long long int> aa;
  aa = num;
  sort(num.begin(), num.end());
  int d = 0;
  vector<long long int> ans;
  for (int i = 0; i < n; i++) {
    if (i != n - 1) {
      if (jum - num[i] - num[n - 1] == num[n - 1])
        d += 1, ans.push_back(num[i]), vec[num[i]]++;
    } else {
      if (jum - num[i] - num[n - 2] == num[n - 2])
        d += 1, ans.push_back(num[i]), vec[num[i]]++;
    }
  }
  if (d == 0)
    cout << "0";
  else {
    long long int sum = 0;
    for (auto i = vec.begin(); i != vec.end(); i++) {
      sum += (i->second);
    }
    cout << sum << "\n";
    for (int i = 0; i < n; i++) {
      if (vec[aa[i]] > 0) cout << i + 1 << " ";
    }
  }
  return 0;
}
