S = str(input()) T = str(input()) S = S.replace(T,"#") ans = S.count("#") if ans == 0: print(0) else: print(ans)