#include <bits/stdc++.h>
using namespace std;
multiset<int> s;
void erase(int x) { s.erase(s.find(x)); }
int getmax() { return *s.rbegin(); }
const int limit = 1000000;
int n;
int a[limit];
vector<int> sol;
long long int sum;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    sum += a[i];
    s.insert(a[i]);
  }
  for (int i = 1; i <= n; i++) {
    erase(a[i]);
    int maxi = getmax();
    if (sum - a[i] - maxi == maxi) sol.push_back(i);
    s.insert(a[i]);
  }
  cout << int(sol.size()) << endl;
  for (int i = 0; i < int(sol.size()); i++) {
    if (i > 0) cout << " ";
    cout << sol[i];
  }
  cout << endl;
}
