incr::Int -> Int -> Int
incr now k = if now > k then now+k else now*2

solver::Int-> Int -> Int
solver 0 k = 1
solver n k = incr (solver (n-1) k) k

main::IO()
main=do
  nc<-getLine
  kc<-getLine
  let n = read nc
  let k = read kc
  print (solver n k)