n,k = gets.split.map(&:to_i) p [*1..2**n].select{|i| i % 2**k == 0}.size