#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
const int N = 1e6 + 5;
const long long MOD = 1000000007;
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
bool cmp(const pair<int, int>& a, const pair<int, int>& b) {
  return (a.second < b.second);
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long power(long long n, long long k) {
  if (k == 0) return 1;
  long long sq = (power(n, k / 2));
  sq = (sq * sq);
  if (k % 2 == 1) sq = (sq * n);
  return sq;
}
bool isPrime(int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
string to_binary(int x) {
  string s;
  while (x > 0) {
    s += (x % 2 ? '1' : '0');
    x /= 2;
  }
  reverse(s.begin(), s.end());
  return s;
}
bool isPerfect(long long x) {
  if (x < 1) return false;
  long long root(round(sqrt(x)));
  return x == root * root * 1LL;
}
bool valid(int i, int j, int n, int m) {
  return i >= 0 && i < n && j >= 0 && j < m;
}
long long FastPower(long long x, long long y) {
  return (!y ? 1
             : (((y & 1) ? x : 1) % MOD *
                FastPower((x % MOD) * (x % MOD) % MOD, y >> 1) % MOD) %
                   MOD);
}
void solve() {
  int n;
  cin >> n;
  vector<pair<int, int>> arr(n);
  vector<int> ans;
  long long all_sum = 0;
  for (int i = 0; i < n; i++)
    cin >> arr[i].first, arr[i].second = i, all_sum += arr[i].first;
  sort((arr).begin(), (arr).end());
  bool flg = true;
  for (int i = 0; i < n - 1; i++) {
    if ((all_sum - arr[i].first - arr[n - 1].first) == arr[n - 1].first)
      ans.push_back(arr[i].second + 1), flg = false;
  }
  if ((all_sum - arr[n - 1].first - arr[n - 2].first) == arr[n - 2].first)
    ans.push_back(arr[n - 1].second + 1), flg = false;
  if (((int)((ans).size())) == 0) {
    cout << ((int)((ans).size())) << "\n";
  } else {
    cout << ((int)((ans).size())) << "\n";
    for (int i = 0; i < ((int)((ans).size())) - 1; i++) cout << ans[i] << " ";
    cout << ans[((int)((ans).size())) - 1] << "\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t = 1;
  while (t--) solve();
}
