s = str(input()) t = str(input()) cnt = 0 j = 0 while j < len(s)-(len(t)-1): if s[j:j+len(t)] == t: cnt += 1 j += len(t) else: j += 1 print(cnt)