#include <bits/stdc++.h>
using namespace std;
int maxint = numeric_limits<int>::max();
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
long long bino(int n, int m) {
  long long j = 1;
  for (int i = 0; i < m; i++) j = j * (n - i) / (i + 1);
  return j;
}
long long int fast_power(long long int a, long long int x) {
  if (x == 0)
    return 1;
  else if (x == 1)
    return a;
  else {
    long long int R = fast_power(a, x >> 1);
    if (!(x & 1))
      return R * R;
    else
      return R * a * R;
  }
}
void solve() {
  long long int n, c = 0;
  cin >> n;
  long long int a[n];
  long long int b[n];
  vector<pair<long long int, long long int>> vec;
  for (long long int i = 0; i < n; i++) {
    b[i] = 0;
    cin >> a[i];
    vec.push_back(make_pair(a[i], i));
  }
  sort(vec.begin(), vec.end());
  for (long long int i = 0; i < n; i++) {
    if (i == 0)
      b[i] += vec[i].first;
    else
      b[i] += vec[i].first + b[i - 1];
  }
  vector<long long int> v;
  for (long long int i = 0; i < n; i++) {
    if (i != n - 1) {
      if (b[n - 1] - vec[i].first - vec[n - 1].first == vec[n - 1].first)
        v.push_back(vec[i].second);
    } else {
      if (b[n - 2] - vec[n - 2].first == vec[n - 2].first)
        v.push_back(vec[i].second);
    }
  }
  cout << v.size() << endl;
  for (long long int i = 0; i < v.size(); i++) cout << v[i] + 1 << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  long long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
