#include <iostream>
#include <cstring>
using namespace std;
#include<algorithm>
int main() {
char str[100] = { 0 };
char substr[100] = { 0 };
cin.getline(str, sizeof(str));
cin.getline(substr, sizeof(substr));
int count = 0;
// write your code here......
//先将字符数组转化为字符串
string str1(str);
string str2(substr);
int i=0;
//包含在头文件<algorithm>,find(str,i):从第i个字符开始找,找到则返回str2首字符在str1中的下标,未找到返回-1
while(str1.find(str2,i)!=-1)
{
count++;
i=str1.find(str2,i)+1;//后移,防止重复查找
}
cout << count << endl;
return 0;
}