Code python: S = input() N = int(input()) ch = input() Dem = S.lower().count(ch.lower()) CK = N // len(S) * Dem Du = N % len(S) for i in range(Du): if S[i] == ch: CK += 1 print(CK)