S = input().strip()
T = input().strip()

m = len(T)
n = len(S)

matches = []

for i in range(n - m + 1):
    if S[i:i+m] == T:
        start = i
        end = i + m - 1
        matches.append((start, end))

if not matches:
    print(0)
else:
    matches.sort(key=lambda x: x[1])
    count = 0
    last = -1
    for s, e in matches:
        if s > last:
            count += 1
            last = e
    print(count)