import re S = input() T = input() K = S.count(T) print(K)