import math._ object Main { def main(args: Array[String]) { val sc = new java.util.Scanner(System.in) val l, n = sc.nextInt val ans = pow(2, l - 3).toInt * n println(ans) } }