program main implicit none integer::N,K read *,N,K if(K.eq.1) then print '(i0)', 2**(N-3)+2**(N-2)-1 else print '(i0)', 2**(N-K) end if end program main