#include<stdio.h>
//operation a == doubled
//operation b == increase by b
int main(){
    int a, b;
    scanf("%d %d", &a, &b);
    int result = 1;
    for(int i = 0; i < a; i++){
        if(result < b)//it works if result + b is smaller than doubled
        {
            result = result * 2;
        }
        else//it works if result * 2 is smaller than doubled
        {
            result = result + b;
        }
    }
    printf("%d\n", result);
    return 0;
}
#include <stdio.h>
#include <string.h>

int main() {
    int A,B;
    char S[20];
    int C, counts = 0;
    scanf("%d %d", &A, &B);
    scanf("%s", S);
    C = strlen(S);
    
    if(!(S[A] == '-')){
        printf("No");
        return 0;
    }
    for(int i=0;i<C;i++){
        if(S[i] == '-'){
            counts++;
        }
    }
    if(counts > 1){
        printf("No");
        return 0;
    }
    
    printf("Yes");
            
return 0;
}