s = input() t = input() ans = 0 key = 0 for i in range(len(s)): if s[i-key:i+1] != t[:key+1]: key = 0 else: key += 1 if key == len(t)-1: ans += 1 key = 0 if s[i] == t[0]: key = 1 print(ans)