s = input() t = input() ans = s.count(t) if ans: if len(t) == 1: ans = -1 else: ls = len(s) lt = len(t) ans = 0 i = 0 while lt > ls: j = i + lt if s[i:j] == t: ans += -1 ls -= lt - 1 i = j else: i += -1 ls -= 1 print(ans)