import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line[] = br.readLine().split(" ");
        int a = Integer.parseInt(line[0]);
        int b = Integer.parseInt(line[1]);
        int c = Integer.parseInt(line[2]);
        int k = Integer.parseInt(br.readLine());
        
        for (int i = 0; i < k; i++) {
            if (a >= b && a >= c) a = a * 2;
            else if (b >= a && b >= c) b = b * 2;
            else if (c >= a && c >= b) c = c * 2;
        }
        System.out.println(a + b + c);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws Exception {
        
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line[] = br.readLine().split(" ");
        int a = Integer.parseInt(line[0]);
        int b = Integer.parseInt(line[1]);
        int c = Integer.parseInt(line[2]);
        int k = Integer.parseInt(br.readLine());
        
        for (int i = 0; i < k; i++) {
            if (a >= b && a >= c) a = a * 2;
            else if (b >= a && b >= c) b = b * 2;
            else if (c >= a && c >= b) c = c * 2;
        }
        System.out.println(a + b + c);
    }
} Main public static void main(String[] args) throws Exception {
        
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line[] = br.readLine().split(" ");
        int a = Integer.parseInt(line[0]);
        int b = Integer.parseInt(line[1]);
        int c = Integer.parseInt(line[2]);
        int k = Integer.parseInt(br.readLine());
        
        for (int i = 0; i < k; i++) {
            if (a >= b && a >= c) a = a * 2;
            else if (b >= a && b >= c) b = b * 2;
            else if (c >= a && c >= b) c = c * 2;
        }
        System.out.println(a + b + c);
    } main {
        
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line[] = br.readLine().split(" ");
        int a = Integer.parseInt(line[0]);
        int b = Integer.parseInt(line[1]);
        int c = Integer.parseInt(line[2]);
        int k = Integer.parseInt(br.readLine());
        
        for (int i = 0; i < k; i++) {
            if (a >= b && a >= c) a = a * 2;
            else if (b >= a && b >= c) b = b * 2;
            else if (c >= a && c >= b) c = c * 2;
        }
        System.out.println(a + b + c);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line[] = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a = Integer.parseInt(line[0]); a Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 int b = Integer.parseInt(line[1]); b Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 int c = Integer.parseInt(line[2]); c Integer.parseInt(line[2]) Integer.parseInt Integer line[2] line 2 int k = Integer.parseInt(br.readLine()); k Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for (int i = 0; i < k; i++) {
            if (a >= b && a >= c) a = a * 2;
            else if (b >= a && b >= c) b = b * 2;
            else if (c >= a && c >= b) c = c * 2;
        } int i = 0; int i = 0; i 0 i < k i k i++ i++ i {
            if (a >= b && a >= c) a = a * 2;
            else if (b >= a && b >= c) b = b * 2;
            else if (c >= a && c >= b) c = c * 2;
        } {
            if (a >= b && a >= c) a = a * 2;
            else if (b >= a && b >= c) b = b * 2;
            else if (c >= a && c >= b) c = c * 2;
        } if (a >= b && a >= c) a = a * 2;
            else if (b >= a && b >= c) b = b * 2;
            else if (c >= a && c >= b) c = c * 2; a >= b && a >= c a >= b a b a >= c a c a = a * 2 a a * 2 a 2 if (b >= a && b >= c) b = b * 2;
            else if (c >= a && c >= b) c = c * 2; b >= a && b >= c b >= a b a b >= c b c b = b * 2 b b * 2 b 2 if (c >= a && c >= b) c = c * 2; c >= a && c >= b c >= a c a c >= b c b c = c * 2 c c * 2 c 2 System.out.println(a + b + c) System.out.println System.out System System.out a + b + c a + b + c a b c String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line[] = br.readLine().split(" ");
        int a = Integer.parseInt(line[0]);
        int b = Integer.parseInt(line[1]);
        int c = Integer.parseInt(line[2]);
        int k = Integer.parseInt(br.readLine());
        
        for (int i = 0; i < k; i++) {
            if (a >= b && a >= c) a = a * 2;
            else if (b >= a && b >= c) b = b * 2;
            else if (c >= a && c >= b) c = c * 2;
        }
        System.out.println(a + b + c);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line[] = br.readLine().split(" ");
        int a = Integer.parseInt(line[0]);
        int b = Integer.parseInt(line[1]);
        int c = Integer.parseInt(line[2]);
        int k = Integer.parseInt(br.readLine());
        
        for (int i = 0; i < k; i++) {
            if (a >= b && a >= c) a = a * 2;
            else if (b >= a && b >= c) b = b * 2;
            else if (c >= a && c >= b) c = c * 2;
        }
        System.out.println(a + b + c);
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line[] = br.readLine().split(" ");
        int a = Integer.parseInt(line[0]);
        int b = Integer.parseInt(line[1]);
        int c = Integer.parseInt(line[2]);
        int k = Integer.parseInt(br.readLine());
        
        for (int i = 0; i < k; i++) {
            if (a >= b && a >= c) a = a * 2;
            else if (b >= a && b >= c) b = b * 2;
            else if (c >= a && c >= b) c = c * 2;
        }
        System.out.println(a + b + c);
    }
}
