S = list(input()) T = list(input()) ans = 0 for i in range(len(S) - len(T) + 1): if S[i:i+len(T)] == T: S[i+len(T)-1] = "." ans += 1 print(ans)