ans = input().lower()
target = input().lower()
count1 = ans.count(target)

print(count1)