function main(input) {
  var a = input[0]-0;
  var b = input[1]-0;
  var ans = 1;
  for(var i=0;i<N;i++){
    ans = Math.min(ans+b,ans*2);
  }
  console.log(ans);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"))
