def c_count():
    str1 = input().lower()
    str2 = input().lower()
    count = str1.count(str2)
    return count

print(c_count())