https://www.acmicpc.net/problem/1543
line = input()
target = input()
search_line = line
count = 0
while search_line:
if search_line.startswith(target):
count += 1
search_line = search_line[len(target):]
else:
search_line = search_line[1:]
print(count)
document = input()
word = input()
index = 0
result = 0
while len(document) - index >= len(word):
if document[index:index+len(word)] == word:
result += 1
index += len(word)
else:
index += 1
print(result)