S = input() BOT = input() if len(BOT) == 1 and ans != 0: print("-1") else: cnt = 0 for i in range(len(S)-len(BOT)+1): if S[i:i+len(BOT)] == BOT: cnt += 1 print(cnt)