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