n, A, B = map(int, input().split()) S = input().strip() runs = [] i = 0 len_S = len(S) while i <= len_S - 3: if S[i] == 'c' and S[i+1] == 'o' and S[i+2] == 'n': count = 1 j = i + 3 while j <= len_S - 3: if S[j] == 'c' and S[j+1] == 'o' and S[j+2] == 'n': count += 1 j += 3 else: break runs.append(count) i = j else: i += 1 total = 0 for m in runs: ab = A + B full = m // ab rem = m % ab total += full * 2 + (1 if rem >= A else 0) print(total)