char s[50010],c[12],*p;r; main(m){ for(gets(s),gets(c);gets(c);)for(p=s;p=strstr(p,c);++p)++r; r=!printf("%d",r); }