#include <map>
#include <iostream>
int main() {
std::map<int, int> freqs;
int num;
while(std::cin >> num) {
freqs[num]++; //this works because int values start at 0 inside of maps
}
for(auto it = freqs.begin(); it != freqs.end(); it++) {
std::cout << it->first << " occurred " << it->second << " times." << std::endl;
}
return 0;
}
I2luY2x1ZGUgPG1hcD4KI2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50IG1haW4oKSB7CiAgICBzdGQ6Om1hcDxpbnQsIGludD4gZnJlcXM7CiAgICBpbnQgbnVtOwogICAgd2hpbGUoc3RkOjpjaW4gPj4gbnVtKSB7CiAgICAgICAgZnJlcXNbbnVtXSsrOyAvL3RoaXMgd29ya3MgYmVjYXVzZSBpbnQgdmFsdWVzIHN0YXJ0IGF0IDAgaW5zaWRlIG9mIG1hcHMKICAgIH0KICAgIGZvcihhdXRvIGl0ID0gZnJlcXMuYmVnaW4oKTsgaXQgIT0gZnJlcXMuZW5kKCk7IGl0KyspIHsKICAgICAgICBzdGQ6OmNvdXQgPDwgaXQtPmZpcnN0IDw8ICIgb2NjdXJyZWQgIiA8PCBpdC0+c2Vjb25kIDw8ICIgdGltZXMuIiA8PCBzdGQ6OmVuZGw7CiAgICB9CiAgICByZXR1cm4gMDsKfQo=