import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;


public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmpArray = br.readLine().split(" ");
		
		int input[] = new int[3];
		input[0] = Integer.parseInt(tmpArray[0]);
		input[1] = Integer.parseInt(tmpArray[1]);
		input[2] = Integer.parseInt(tmpArray[2]);
		
		Arrays.sort(input);
		
		int k = Integer.parseInt(br.readLine());
		int result = 0;

		for(int i = 0; i < k; i++){
			input[2] *= 2;
		}
		
		for(int i = 0; i < 3; i++){
			result += input[i];
		}
		System.out.println(result);
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmpArray = br.readLine().split(" ");
		
		int input[] = new int[3];
		input[0] = Integer.parseInt(tmpArray[0]);
		input[1] = Integer.parseInt(tmpArray[1]);
		input[2] = Integer.parseInt(tmpArray[2]);
		
		Arrays.sort(input);
		
		int k = Integer.parseInt(br.readLine());
		int result = 0;

		for(int i = 0; i < k; i++){
			input[2] *= 2;
		}
		
		for(int i = 0; i < 3; i++){
			result += input[i];
		}
		System.out.println(result);
	}

} Main /**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmpArray = br.readLine().split(" ");
		
		int input[] = new int[3];
		input[0] = Integer.parseInt(tmpArray[0]);
		input[1] = Integer.parseInt(tmpArray[1]);
		input[2] = Integer.parseInt(tmpArray[2]);
		
		Arrays.sort(input);
		
		int k = Integer.parseInt(br.readLine());
		int result = 0;

		for(int i = 0; i < k; i++){
			input[2] *= 2;
		}
		
		for(int i = 0; i < 3; i++){
			result += input[i];
		}
		System.out.println(result);
	} main {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmpArray = br.readLine().split(" ");
		
		int input[] = new int[3];
		input[0] = Integer.parseInt(tmpArray[0]);
		input[1] = Integer.parseInt(tmpArray[1]);
		input[2] = Integer.parseInt(tmpArray[2]);
		
		Arrays.sort(input);
		
		int k = Integer.parseInt(br.readLine());
		int result = 0;

		for(int i = 0; i < k; i++){
			input[2] *= 2;
		}
		
		for(int i = 0; i < 3; i++){
			result += input[i];
		}
		System.out.println(result);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] tmpArray = br.readLine().split(" "); tmpArray br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int input[] = new int[3]; input new int[3] 3 input[0] = Integer.parseInt(tmpArray[0]) input[0] input 0 Integer.parseInt(tmpArray[0]) Integer.parseInt Integer tmpArray[0] tmpArray 0 input[1] = Integer.parseInt(tmpArray[1]) input[1] input 1 Integer.parseInt(tmpArray[1]) Integer.parseInt Integer tmpArray[1] tmpArray 1 input[2] = Integer.parseInt(tmpArray[2]) input[2] input 2 Integer.parseInt(tmpArray[2]) Integer.parseInt Integer tmpArray[2] tmpArray 2 Arrays.sort(input) Arrays.sort Arrays input int k = Integer.parseInt(br.readLine()); k Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int result = 0; result 0 for(int i = 0; i < k; i++){
			input[2] *= 2;
		} int i = 0; int i = 0; i 0 i < k i k i++ i++ i {
			input[2] *= 2;
		} {
			input[2] *= 2;
		} input[2] *= 2 input[2] input 2 2 for(int i = 0; i < 3; i++){
			result += input[i];
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			result += input[i];
		} {
			result += input[i];
		} result += input[i] result input[i] input i System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmpArray = br.readLine().split(" ");
		
		int input[] = new int[3];
		input[0] = Integer.parseInt(tmpArray[0]);
		input[1] = Integer.parseInt(tmpArray[1]);
		input[2] = Integer.parseInt(tmpArray[2]);
		
		Arrays.sort(input);
		
		int k = Integer.parseInt(br.readLine());
		int result = 0;

		for(int i = 0; i < k; i++){
			input[2] *= 2;
		}
		
		for(int i = 0; i < 3; i++){
			result += input[i];
		}
		System.out.println(result);
	}

} public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmpArray = br.readLine().split(" ");
		
		int input[] = new int[3];
		input[0] = Integer.parseInt(tmpArray[0]);
		input[1] = Integer.parseInt(tmpArray[1]);
		input[2] = Integer.parseInt(tmpArray[2]);
		
		Arrays.sort(input);
		
		int k = Integer.parseInt(br.readLine());
		int result = 0;

		for(int i = 0; i < k; i++){
			input[2] *= 2;
		}
		
		for(int i = 0; i < 3; i++){
			result += input[i];
		}
		System.out.println(result);
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;


public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmpArray = br.readLine().split(" ");
		
		int input[] = new int[3];
		input[0] = Integer.parseInt(tmpArray[0]);
		input[1] = Integer.parseInt(tmpArray[1]);
		input[2] = Integer.parseInt(tmpArray[2]);
		
		Arrays.sort(input);
		
		int k = Integer.parseInt(br.readLine());
		int result = 0;

		for(int i = 0; i < k; i++){
			input[2] *= 2;
		}
		
		for(int i = 0; i < 3; i++){
			result += input[i];
		}
		System.out.println(result);
	}

}
