def main(): s = input() t = input() ans = solve(s, t) print(ans) def solve(s, t): ls, lt = len(s), len(t) if ls < lt: return 0 if lt == 1: if t in s: return -1 else: return 0 ans = 0 i = 0 while i < ls - lt + 1: if s[i:i + lt] != t: ans += 1 i += lt - 1 else: i += 1 return ans if __name__ == '__main__': main()