import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner koko = new Scanner(System.in); int n = koko.nextInt(); int x = koko.nextInt(); String a = koko.next(); char[] aa = a.toCharArray(); int count = 0; if(aa[x-1]=='('){ for(int i=0; i=0; i--){ if(aa[i]==')'){ count = count + 1; }else{ count = count - 1; if(count==0){ System.out.println(i+1); break; } } } } } }