#include <bits/stdc++.h>
using namespace std;
#define MAX 200020
vector<int> FWT(MAX,0);
void ubaci(int x, int koliko)
{
 for (;x< MAX;x+=x&-x) FWT[x]=(FWT[x]+koliko)%2;
}
int upit(int x)
{
 int rez=0;
 for (;x>0;x-=x&-x) rez=(rez+FWT[x])%2;
 return rez;
}

void minimumCost(int n, int a, int b)
{
    vector<int> groupOfZeros;
    int len = 0, i = 0, br=0, p=1;
    bool increment_need = true;
    while((n>p)and(upit(n)==0)) n--;
    while((p<n)and(upit(p)==0)) p++;
    i=p;
    while (i <= n) {
        increment_need = true;
        while (i <= n && upit(i) == 0) {
            len++;
            i++;
            increment_need = false;
        }
        if (increment_need == true) {
            i++;
        }
        if (len != 0) {
            groupOfZeros.push_back(len);
        }
        len = 0;
    }
    sort(groupOfZeros.begin(), groupOfZeros.end());
    i = p;
    bool found_ones = false;
    int NumOfOnes = 0, jedince=0;
    while (i <= n) {
        found_ones = false;
        while (i <= n && upit(i) == 1) {
            i++;
            found_ones = true;
            jedince++;
        }
        if (found_ones == false) i++;
        else NumOfOnes++;
    }
    int ans = jedince*b;
    //if(jedince==0) return 0;
    for (int i = p; i <= n; i++) {
        int curr = 0, totalOnes = NumOfOnes;
        if (i == p) {
            curr = totalOnes * a;
        }
        else {

            int mark = i, num_of_changes = 0;
            for (int x : groupOfZeros) {
                if (mark >= x) {
                    totalOnes--;
                    mark -= x;
                    num_of_changes += x;
                }
                else {
                    break;
                }
            }
            curr = (num_of_changes * b) + (totalOnes * a);
        }
        ans = min(ans, curr);
    }
    cout <<ans <<endl;
}
int main()
{
    string s;
    int n, q, a, b;
    int X, Y = 1;
    cin>>n>>X>>q;
    cin>>s;
    for(int i=1; i<=n; i++){
        if(s[i-1]=='1'){
            ubaci(i,1); ubaci(i+1,1);
        }
    }
    //for(int i=1; i<=n; i++) cout<<upit(i)<<endl;
    while(q--){
        cin>>a>>b;
        ubaci(a,1); ubaci(b+1,1);
        //for(int i=1; i<=n; i++) cout<<upit(i)<<endl;
        minimumCost(n, X, Y);
    }
    return 0;
}