Problem: You are given two strings s and t consisting of lowercase Latin letters. The length of t is 2 (i.e. this string consists only of two characters).

In one move, you can choose any character of s and replace it with any lowercase Latin letter. More formally, you choose some i and replace s_i (the character at the position i) with some character from 'a' to 'z'.

You want to do no more than k replacements in such a way that maximizes the number of occurrences of t in s as a subsequence.

Recall that a subsequence is a sequence that can be derived from the given sequence by deleting zero or more elements without changing the order of the remaining elements.

Input

The first line of the input contains two integers n and k (2 ≤ n ≤ 200; 0 ≤ k ≤ n) — the length of s and the maximum number of moves you can make. The second line of the input contains the string s consisting of n lowercase Latin letters. The third line of the input contains the string t consisting of two lowercase Latin letters.

Output

Print one integer — the maximum possible number of occurrences of t in s as a subsequence if you replace no more than k characters in s optimally.

Examples

Input


4 2
bbaa
ab


Output


3


Input


7 3
asddsaf
sd


Output


10


Input


15 6
qwertyhgfdsazxc
qa


Output


16


Input


7 2
abacaba
aa


Output


15

Note

In the first example, you can obtain the string "abab" replacing s_1 with 'a' and s_4 with 'b'. Then the answer is 3.

In the second example, you can obtain the string "ssddsdd" and get the answer 10.

In the fourth example, you can obtain the string "aaacaaa" and get the answer 15.

Solution (in JAVA):

Solution:
/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
    
    private int sch, lch;
    private String str;
    private Integer[][][] dp;
    private Scanner sc = new Scanner(System.in);
    
    private int callMe(int i, int ac, int k) {

        if(i == str.length()) {
            return 0;
        }
        if(dp[i][ac][k] != null) {
            return dp[i][ac][k];
        }
        
        int ch = str.charAt(i) - 'a';
        
        // CONVERT TO SCH
        int x1 = (k > 0 || ch == sch) ? callMe(i + 1, ac + 1, ch == sch ? k : (k - 1)) : 0;
        
        // CONVERT TO LCH
        int x2 = (k > 0 || ch == lch) ? (callMe(i + 1, lch == sch ? (ac + 1) : ac, ch == lch ? k : (k - 1)) + ac) : 0;
        
        // SKIP
        int x3 = callMe(i + 1, ch == sch ? (ac + 1) : ac, k) + (ch == lch ? ac : 0);
        
        // System.out.println(stack + ":" + Arrays.asList(i, ac, k) + ":" + Arrays.asList(x1, x2, x3));
        int ans = Math.max(x1, Math.max(x2, x3));
        return dp[i][ac][k] = ans;
    }
    
    private void solve() {
        // int T = sc.nextInt();
        // while(T-- > 0) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            String s = sc.next();
            String t = sc.next();
            
            str = s;
            sch = t.charAt(0) - 'a';
            lch = t.charAt(1) - 'a';
            dp = new Integer[n + 1][n + 1][k + 1];
            System.out.println(callMe(0, 0, k));
        // }
    }
    
	public static void main (String[] args) throws java.lang.Exception
	{
		new Codechef().solve();
	}
}