#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
long long powmod(long long a, long long b, long long mod) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res % mod;
}
const int N = 1e5 + 10;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<pair<long long, int> > a(n + 1);
  a[0].first = 0, a[0].second = 0;
  long long pref[n + 1], sum = 0;
  pref[0] = 0;
  for (int i = 1; i <= n; ++i)
    cin >> a[i].first, a[i].second = i, sum += a[i].first,
                       pref[i] = a[i].first + pref[i - 1];
  vector<int> ans;
  sort(a.begin(), a.end());
  for (int i = n; i > 0; --i) {
    long long x = sum - a[i].first;
    long long rem = 0;
    if (i == n) {
      x -= a[n - 1].first;
      if (x == a[n - 1].first) ans.push_back(a[i].second);
    } else {
      x -= a[n].first;
      if (x == a[n].first) ans.push_back(a[i].second);
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
