func main() var ss: [][]char :: cui@input().split(" ") var N: int :: ss[0].toInt(&) var K: int :: ss[1].toInt(&) var S: []char :: cui@input() var i: int :: K - 1 var nestLevel: int :: 0 while(true) do nestLevel :+ S[i] = '(' ?(1, -1) if(nestLevel = 0) do cui@print("\{i + 1}\n") ret else do i :+ nestLevel > 0 ?(1, -1) end if end while end func