var input = require('fs').readFileSync('/dev/stdin', 'utf8').split(/\n/g);
var n = input[0] - 0;
var k = input[1] - 0;
var list = [];
for (var i = 0; i <= n; i++) {
    var l = (1 << i) + k * (n - i);
    list.push(l);
}
console.log(Math.min.apply(null, list));