#include <iostream>
#include <set>
#include <ctime>
using namespace std;
int main()
{
clock_t tstart = clock();
multiset<int> a;
for(int i = 0; i < 10000; ++i)
a.insert(123);
int sum = 0;
for(int i = 0; i < 10000; ++i)
sum += a.count(123);
cout << sum << endl;
cerr << (clock() - tstart) / double(CLOCKS_PER_SEC) << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c2V0PgojaW5jbHVkZSA8Y3RpbWU+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpCnsKCWNsb2NrX3QgdHN0YXJ0ID0gY2xvY2soKTsKCW11bHRpc2V0PGludD4gYTsKCWZvcihpbnQgaSA9IDA7IGkgPCAxMDAwMDsgKytpKQoJCWEuaW5zZXJ0KDEyMyk7CglpbnQgc3VtID0gMDsKCWZvcihpbnQgaSA9IDA7IGkgPCAxMDAwMDsgKytpKQoJCXN1bSArPSBhLmNvdW50KDEyMyk7Cgljb3V0IDw8IHN1bSA8PCBlbmRsOwoJY2VyciA8PCAoY2xvY2soKSAtIHRzdGFydCkgLyBkb3VibGUoQ0xPQ0tTX1BFUl9TRUMpIDw8IGVuZGw7CglyZXR1cm4gMDsKfQ==