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