#思路:
#全部转换成大写或者小写之后再利用count去数个数
a=input().lower()
b=input().lower()
print(a.count(b))