function myout(text){console.log(text);}//standard output
function Main(input) {
	//input = parseInt(input);
	//input = input.split(" ");
	input = input.split("\n");
	//input = input.split(" ").map((a)=>Number(a));
	//input = input.split("\n").map((a)=>Number(a));
  var list = input[0].split(" ").map((a)=>Number(a));
  var K = parseInt(input[1]);
  var output = 0;
  var max = Math.max.apply(null,list);
  list.splice(list.indexOf(max),1);
  //myout(list);
  output += list[0] + list[1];
  for(var i = 0; i < K; i++){
    max *= 2;
  }
  output += max;
  myout(output);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
