#include<bits/stdc++.h>
using namespace std;
int main(){
string s1,s2;
int h=0,p;
cin>>s1>>s2;
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: wenda
Language: C++
Result: Accepted
Time:14 ms
Memory:2076 kb
****************************************************************/