# 入力受け取り N, K = gets.split.map(&:to_i) max = 2**N base = 2**K c = 0 max.times do |i| c += 1 if i % base == 0 end puts(c)