S = input() T = input() n = len(T) ans = 0 if T in S and n > 1: i = 0 while i < len(S)-n+1: cnt = 0 for j in range(n): if S[i+j] == T[j]: cnt += 1 if cnt == n: ans += 1 i += n else: i += 1 elif T in S and n == 1: ans = -1 else: ans = 0 print(ans)