S=input() s=input() ANS=S.replace(s,"A") print(ANS.count("A"))