#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 5, maxa = 1e6 + 5;
long long a[maxn];
vector<long long> vis[maxa], ans;
signed main() {
  long long n, cnt = 0;
  long long sum = 0;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
    vis[a[i]].push_back(i + 1);
  }
  sort(a, a + n);
  if (sum - a[n - 1] > a[n - 1]) {
    long long tmp = sum - a[n - 1] * 2;
    if (tmp < a[n - 1]) {
      cnt += vis[tmp].size();
      for (long long i = 0; i < vis[tmp].size(); i++) {
        ans.push_back(vis[tmp][i]);
      }
    }
  }
  if (sum - a[n - 1] == 2 * a[n - 2]) {
    long long tmp = a[n - 1];
    cnt += vis[tmp].size();
    for (long long i = 0; i < vis[tmp].size(); i++) {
      ans.push_back(vis[tmp][i]);
    }
  }
  cout << cnt << endl;
  for (long long i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
