#include using namespace std; int main() { long long N, K, L; cin >> N >> K >> L; string S; cin >> S; long long now = 0; bool flag = false; for (int i = 0; i < N; i++) { if (S[i] == '0') { now++; if (now >= K) flag = true; } else now = 0; } for (int i = 0; i < N; i++) { if (S[i] == '0') { now++; if (now >= K) flag = true; } else now = 0; } now = 0; for (int i = 0; i < N; i++) { if (S[i] == '1') { now++; if (now >= K) flag = true; } else now = 0; } for (int i = 0; i < N; i++) { if (S[i] == '1') { now++; if (now >= K) flag = true; } else now = 0; } if (!flag) cout << N * L << endl; else { long long sum = 0; for (int i = 0; i < N; i++) { if (S[i] == '0') sum += 1; else sum += 2 * K - 2; } sum *= L; long long amari = sum % (2 * K - 1); if (amari == 0) cout << 2 * (K - 1) << endl; else if (amari < K) cout << 2 * K - 2 - amari << endl; else cout << amari - 1 << endl; } }