import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines s = readline().decode().strip() t = readline().decode().strip() ans = 0 while True: pos = s.find(t) if pos == -1: break ans += 1 s = s[pos + len(t) - 1:] print(ans)