import java.util.Scanner val scanner = Scanner(System.`in`) fun main(){ var n = scanner.nextInt() var k = scanner.nextInt() var x = 1.shl(k) var m = 1.shl(n) var cnt = 0 if (k == 0){ println(m) return } while (x <= m) { cnt += 1 x = x.shl(1) } println(cnt) }