#include<bits/stdc++.h>
using namespace std;
int main(){
string s1,s2;
int h=0;
cin>>s1>>s2;
int p=s2.find(s1);
if(p==-1) {
cout<<0;
}else{
while(p!=-1){
h++;
p=s2.find(s1,p+1);
}
cout<<h;
}
return 0;
}
/**************************************************************
Problem: 1477
User: tangkaixuan
Language: C++
Result: Accepted
Time:14 ms
Memory:2076 kb
****************************************************************/