string str, sentence;
cin >> str;
cin >> sentence;
string::size_type n = 0, i = 0;
while((i = sentence.find(str, i + 1)) != string::npos)
 n++;