S = input() T = input() n = len(T) if n == 1: if T in S: print(-1) else: print(0) exit() ans = 0 i = S.find(T) while i != -1: ans += 1 i = S.find(T, i + n - 1) print(ans)