S = input() T = input() s = len(S) t = len(T) if T not in S: print(0) elif t == 1: print(-1) else: X = 0 for i in range(s): if S[i:i+t] == T: X += 1 print(X)