#include <iostream>
#include <map>
#include <string>
using namespace std;
int main()
{
map<string,int> word_count;
string word;
while(cin>>word)
{
pair<map<string,int>::iterator,bool> ret;
ret=word_count.insert(make_pair(word,1));
if(!ret.second)
{
++ret.first->second;
}
}
system("pause");
return 0;
}