import bisect n, A, B = map(int, input().split()) S = input().strip() runs = [] i = 0 while i <= len(S) - 3: if S[i] == 'c' and S[i+1] == 'o' and S[i+2] == 'n': cnt = 0 while i <= len(S) - 3 and S[i] == 'c' and S[i+1] == 'o' and S[i+2] == 'n': cnt += 1 i += 3 runs.append(cnt) else: i += 1 runs.sort() count = 0 step = 1 current_runs = runs.copy() while True: if step % 2 == 1: X = A else: X = B idx = bisect.bisect_left(current_runs, X) if idx < len(current_runs): run = current_runs.pop(idx) remaining = run - X if remaining > 0: bisect.insort(current_runs, remaining) count += 1 step += 1 else: break print(count)