from itertools import count str1 = input().upper() # 全部转成大写 str2 = input().upper()# 全部转成大写 print(str1.count(str2))# 调用count()方法