New Year is getting near. So it's time to change handles on codeforces. Mishka wants to change his handle but in such a way that people would not forget who he is.

To make it work, he only allowed to change letters case. More formally, during one handle change he can choose any segment of his handle [i; i + l - 1] and apply tolower or toupper to all letters of his handle on this segment (more fomally, replace all uppercase letters with corresponding lowercase or vice versa). The length l is fixed for all changes.

Because it is not allowed to change codeforces handle too often, Mishka can perform at most k such operations. What is the minimum value of min(lower, upper) (where lower is the number of lowercase letters, and upper is the number of uppercase letters) can be obtained after optimal sequence of changes?

Input

The first line of the input contains three integers n, k and l (1 ≤ n, k, l ≤ 10^6, l ≤ n) — the length of Mishka's handle, the number of changes and the length of the segment.

The second line of the input contains one string s, consisting of n lowercase and uppercase Latin letters — Mishka's handle.

Output

Print one integer — the minimum value of min(lower, upper) after that Mishka change his handle at most k times in a way described in the problem statement.

Examples

Input


7 1 4
PikMike


Output


0


Input


15 2 2
AaAaAAaaAAAAaaA


Output


2


Input


14 2 6
aBcdEFGHIJklMn


Output


0


Input


9 2 2
aAaAAAaaA


Output


1
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.util.List;
 import java.util.*;
 public class realfast implements Runnable 
  {
    private static final int INF = (int) 1e9;
    long in= 1000000007;
    long fac[]= new long[1000001];
    long inv[]=new long[1000001];

    public  void solve() throws IOException 
    {

        //int t = readInt();
        int n = readInt();
        int k = readInt();
        int l = readInt();

        String s = readString();
      //  int ans=n;
       

        
        
         int arr[]=new int[n];
         int brr[]=new int[n];

         for(int i =0;i<n;i++)
         {
            int lp = (int)s.charAt(i)-97;
            if(lp<0){
             //   out.println("hello");
                arr[i]=1;
            }
            else{
               // out.println("bello");
                brr[i]=1;
            }
         }

         int l1= slow(arr,l,k);
         int r1= slow(brr,l,k);

         out.println(Math.min(l1,r1));

       

      

    }
    public int slow(int arr[], int l , int k )
    {
        int n = arr.length;
        int ans=0;
        int left =0;
        int right=n;
        int dp[][]=new int[n+1][2];
        while(left<=right)
        {
            int mid = left+(right-left)/2;

            if(search(dp,mid,arr,l)>k)
            {
                left=mid+1;
                ans=mid;
            }
            else
                right=mid-1;

        }
         int pal = search(dp,ans,arr,l);

         if(pal<=k)
            return 0;
         search(dp,ans+1,arr,l);
         return dp[n][0]- k*(ans+1);
        
    }
    public int search(int dp[][], int mid , int arr[], int l)
    { 
           int n = arr.length;
            for(int i=0;i<=n;i++)
            {
                dp[i][0]=INF;
                dp[i][1]=INF;
            }
            dp[0][0]=0;
            dp[0][1]=0;


            for(int i =0;i<n;i++)
            {
                if(arr[i]+dp[i][0]<dp[i+1][0])
                {
                      dp[i+1][0]= dp[i][0]+arr[i];
                      dp[i+1][1]= dp[i][1];
                }
                else if(dp[i+1][0]==dp[i][0]+arr[i]&&dp[i][1]<dp[i+1][1])
                {
                        dp[i+1][1]= dp[i][1];
                      //  dp[i+1][0]= dp[i][0];
                }
               
                if(dp[Math.min(i+l,n)][0]>dp[i][0]+mid)
                {
                      dp[Math.min(i+l,n)][0]= dp[i][0]+mid;
                      dp[Math.min(i+l,n)][1]= dp[i][1]+1;
                }
                else if(dp[Math.min(i+l,n)][0]==dp[i][0]+mid && dp[i][1]+1<dp[Math.min(i+l,n)][1])
                {
                    dp[Math.min(i+l,n)][1]= 1+dp[i][1];
                }
            }


          return dp[n][1]; 
    }
    
    public int value (int seg[], int left , int right ,int index, int l, int r)
    {
            
            if(left>right)
            {
              return -100000000;
            }
            if(right<l||left>r)
                return -100000000;
            if(left>=l&&right<=r)
                return seg[index];
            int mid = left+(right-left)/2;
            int val = value(seg,left,mid,2*index+1,l,r);
            int val2 = value(seg,mid+1,right,2*index+2,l,r);
            return Math.max(val,val2);

    }
   
    public int gcd(int a , int b )
    {
      if(a<b)
      {
        int t =a;
        a=b;
        b=t;
      }
      if(a%b==0)
        return b ;
      return gcd(b,a%b);
    }
    public long pow(long n , long p,long m)
    {
         if(p==0)
            return 1;
        long val = pow(n,p/2,m);;
        val= (val*val)%m;
        if(p%2==0)
            return val;
        else
            return (val*n)%m;
    }
    
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    public static void main(String[] args) {
        new Thread(null, new realfast(), "", 128 * (1L << 20)).start();
    }
 
    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    private PrintWriter out;
 
    @Override
    public void run() {
        try {
            if (ONLINE_JUDGE || !new File("input.txt").exists()) {
                reader = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                reader = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }
            solve();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            try {
                reader.close();
            } catch (IOException e) {
                // nothing
            }
            out.close();
        }
    }
 
    private String readString() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }
 
    @SuppressWarnings("unused")
    private int readInt() throws IOException {
        return Integer.parseInt(readString());
    }
 
    @SuppressWarnings("unused")
    private long readLong() throws IOException {
        return Long.parseLong(readString());
    }
 
    @SuppressWarnings("unused")
    private double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }
}
class edge implements Comparable<edge>{
    int u ;
    int v;
    
    edge(int u, int v)
    {
       this.u=u;
       this.v=v;
    }
    public int compareTo(edge e)
    {
        return this.v-e.v;
    }
}