#include <iostream>
#include <fstream>
#include <vector>
#include <list>
#include <algorithm>
using namespace std;
int main() {
ifstream in("input.txt");
if (in) {
list<int> v;
int x;
while (in >> x) v.push_back(x);
cout << "Введите искомое число:";
cin >> x;
int how_much = count(v.begin(), v.end(), x);
cout << how_much << endl;
list<int> pos_list;
for (list<int>::iterator pos = v.begin(); pos != v.end(); ++pos) {
if(*pos == how_much){
pos_list.push_back(pos);
}
}
list<int>::iterator i;
for (i = pos_list.begin(); i != pos_list.end(); ++i)
cout << *i << " ";
return 0;
}
return 1;
}