function Main(input) {

	input = input.split("\n");
	var k = Math.pow(2,Number(input[1]));
	
	input = input[0].split(" ");
	
	input.sort(function(a,b){
		if(Number(a)<Number(b))return -1;
		if(Number(a)>Number(b))return 1;
		return 0;
	});
	
	var a = Number(input[0]);
	var b = Number(input[1]);
	var c = Number(input[2]);
	
	var ret = a + b + c * k;
	console.log(ret);
}

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