#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native")
#pragma GCC optimize("unroll-loops")
using namespace std;
const int N = int(2e5) + 111;
const int MOD = int(1e9) + 7;
long long a[N], prefix[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  long long maxim = -1, maxim2 = -1;
  long long sum = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
    if (a[i] >= maxim)
      maxim2 = maxim, maxim = a[i];
    else if (a[i] > maxim2)
      maxim2 = a[i];
  }
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    long long cur = maxim;
    if (a[i] == maxim) cur = maxim2;
    if (sum - a[i] - 2 * cur == 0) ans.push_back(i + 1);
  }
  cout << ans.size() << endl;
  for (auto i : ans) {
    cout << i << " ";
  }
  return 0;
}
