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