#include <stdio.h>

int main()
{
	int N, K, x=1, plus=1, times=1, min;
	scanf("%d %d", &N, &K);
	
	for(int a=1; a<=N; a++){
		x=1; plus=1; times=1;
		
		while(times<=a){
			x*=2;
			times++;
		}
		
		while(plus<=N-a){
			x+=K;
			plus++;
		}
		
		if(a==1){
			min=x;
		}
		else if(x<min){
			min=x;
		}		
	
	}
	
		printf("%d\n", min);

	
	return 0;
}