#include <bits/stdc++.h>
using namespace std;
string intostr(int x) {
  stringstream ss;
  ss << x;
  string str = ss.str();
  return str;
}
char Uplowch(char ch) {
  if (ch >= 'A' && ch <= 'Z') ch += 32;
  return ch;
}
char Lowupch(char ch) {
  if (ch >= 'a' && ch <= 'z') ch -= 32;
  return ch;
}
bool Isalpha(char ch) {
  if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z')) return true;
  return false;
}
int Strtoint(string str) {
  stringstream ss(str);
  int x = 0;
  ss >> x;
  return x;
}
string Intostr(int x) {
  stringstream ss;
  ss << x;
  string str = ss.str();
  return str;
}
int dx[] = {0, 0, -1, 1};
int dy[] = {1, -1, 0, 0};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  long long ar[n + 3];
  long long sum = 0;
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    cin >> ar[i];
    mp[ar[i]]++;
    sum += ar[i];
  }
  vector<long long> v;
  for (long long i = 0; i < n; i++) {
    if ((sum - ar[i]) % 2 == 0) {
      long long id = (sum - ar[i]) / 2;
      if ((ar[i] == id && mp[id] > 1) || (ar[i] != id && mp[id]))
        v.push_back(i + 1);
    }
  }
  cout << (long long)v.size() << "\n";
  for (long long i = 0; i < (long long)v.size(); i++) {
    cout << v[i] << ' ';
  }
  cout << "\n";
}
