#include <iostream>
#include <stdio.h>
#include <vector>
#include <string>

// 1. od prvog 1 do zadnjeg 1
// 2. svakog 1 u 0
int Optimalno1(std::vector<int>a, int n, int c, int q) {
	int count0 = 0, count1 = 0, x1 = 0, j1, j2;
	for (int i = 0; i < n; i++) {
		if (a[i] == 0) count0 += 1;
		if (a[i] == 1) {
			j1 = count0;
			count0 = 0;
			for (int j = i; j < n; j++) {
				if (a[j] == 0) count0 += 1;
				if (a[j] == 1) count0 = 0;
			}
			j2 = count0;
			for (int j = j1; j < (n - j2);j++) {
				if (a[j] == 1) a[j] = 0;
				else if (a[j] == 0) {
					a[j] = 1;
					count1++;
				}
			}
			x1 += c;
		}
		if (x1 > 0) break;
	}
	for (int i = 0; i < n; i++) {
		if (a[i] == 1) {
			x1 += 1;
		}
	}
	return x1;
}

// ako je 2 ili manje jedinica
int Optimalno2(std::vector<int>a, int n, int c, int q) {
	int count1 = 0, x2 = 0;
	for (int i = 0; i < n; i++) {
		if(a[i] == 1)count1 += 1;
	}
	if (count1 < 3) {
		x2 += count1;
	}
	if (x2 != 0) return x2;
	else return n * c;
}

// svaki podniz jedinica
int Optimalno3(std::vector<int>a, int n, int c, int q) {
	int x3 = 0, j = 0, count1 = 0;
	for (int i = 0; i < n; i++) {
		if (a[i] == 1) {
			count1 += 1;
		}
		if (a[i] == 0 || i == n - 1) {
			if (count1 > 1) x3 += c;
			else if (count1 == 1) x3 += 1;
			count1 = 0;
		}
	}
	return x3;
}

int Optimalno4(std::vector<int>a, int n, int c, int q) {
	int x4 = 0;
	for (int i = 0; i < n; i++) {
		if (a[i] == 1)x4++;
	}
	if (x4 != 0) return x4;
	else return n * c;
}

int main() {
	int n, c, q, o, count = 0, final = 0;
	std::string e;
	std::vector<int>a;
	std::cin >> n >> c >> q;
	std::vector<int>b;
	std::cin >> e;
	for (int i = 0; i < n; i++) {
		if (int(e[i]) == 48)a.push_back(0);
		else if (int(e[i]) == 49)a.push_back(1);
	}
	for (int i = 0; i < q*2; i++) {
		std::cin >> o;
		b.push_back(o);
	}
	for (int i = 0, t = 0; t < q; t++) {
		for (int j = b[i]-1; j <= b[i + 1]-1; j++) {
			if (a[j] == 1) a[j] = 0;
			else if (a[j] == 0) a[j] = 1;
		}
		int x1 = Optimalno1(a, n, c, q);
		int x2 = Optimalno2(a, n, c, q);
		int x3 = Optimalno3(a, n, c, q);
		int x4 = Optimalno4(a, n, c, q);
		if (x1 < x2) final = x1;
		else final = x2;
		if (final > x3) final = x3;
		if (final > x4) final = x4;
		std::cout << final << std::endl;
		i += 2;
	}
}