N;main(K){scanf("%d%d", &N,&K);N=!printf("%d\n",(int)pow(2,N-K)-1/K*N);}