#include<cstdio> #include<string> #include<iostream> using namespace std; int main(){ string S1 ; string S2 ; cin >> S1 >> S2; int len1 = S1.length(); int len2 = S2.length(); int pos =0; for(int i = 0 ; i < len1;++i){ int pos2 = S1.find(S2,i); if(pos2 != -1){ ++pos; i=pos2; continue; } } printf("%d\n",pos); }