import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        if (scanner.hasNextLine()) {
            String[] array = scanner.nextLine().split(" ");
            long a = Integer.parseInt(array[0]);
            long b = Integer.parseInt(array[1]);
            long c = Integer.parseInt(array[2]);
            int k = Integer.parseInt(scanner.nextLine());

            if (a > b && a > c) {
                for (int i = 0; i < k; ++i) {
                    a *= 2;
                }
            } else if (b > c) {
                for (int i = 0; i < k; ++i) {
                    b *= 2;
                }
            } else {
                for (int i = 0; i < k; ++i) {
                    c *= 2;
                }
            }
            System.out.println(a + b + c);
        }
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        if (scanner.hasNextLine()) {
            String[] array = scanner.nextLine().split(" ");
            long a = Integer.parseInt(array[0]);
            long b = Integer.parseInt(array[1]);
            long c = Integer.parseInt(array[2]);
            int k = Integer.parseInt(scanner.nextLine());

            if (a > b && a > c) {
                for (int i = 0; i < k; ++i) {
                    a *= 2;
                }
            } else if (b > c) {
                for (int i = 0; i < k; ++i) {
                    b *= 2;
                }
            } else {
                for (int i = 0; i < k; ++i) {
                    c *= 2;
                }
            }
            System.out.println(a + b + c);
        }
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        if (scanner.hasNextLine()) {
            String[] array = scanner.nextLine().split(" ");
            long a = Integer.parseInt(array[0]);
            long b = Integer.parseInt(array[1]);
            long c = Integer.parseInt(array[2]);
            int k = Integer.parseInt(scanner.nextLine());

            if (a > b && a > c) {
                for (int i = 0; i < k; ++i) {
                    a *= 2;
                }
            } else if (b > c) {
                for (int i = 0; i < k; ++i) {
                    b *= 2;
                }
            } else {
                for (int i = 0; i < k; ++i) {
                    c *= 2;
                }
            }
            System.out.println(a + b + c);
        }
    } main {
        Scanner scanner = new Scanner(System.in);

        if (scanner.hasNextLine()) {
            String[] array = scanner.nextLine().split(" ");
            long a = Integer.parseInt(array[0]);
            long b = Integer.parseInt(array[1]);
            long c = Integer.parseInt(array[2]);
            int k = Integer.parseInt(scanner.nextLine());

            if (a > b && a > c) {
                for (int i = 0; i < k; ++i) {
                    a *= 2;
                }
            } else if (b > c) {
                for (int i = 0; i < k; ++i) {
                    b *= 2;
                }
            } else {
                for (int i = 0; i < k; ++i) {
                    c *= 2;
                }
            }
            System.out.println(a + b + c);
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) if (scanner.hasNextLine()) {
            String[] array = scanner.nextLine().split(" ");
            long a = Integer.parseInt(array[0]);
            long b = Integer.parseInt(array[1]);
            long c = Integer.parseInt(array[2]);
            int k = Integer.parseInt(scanner.nextLine());

            if (a > b && a > c) {
                for (int i = 0; i < k; ++i) {
                    a *= 2;
                }
            } else if (b > c) {
                for (int i = 0; i < k; ++i) {
                    b *= 2;
                }
            } else {
                for (int i = 0; i < k; ++i) {
                    c *= 2;
                }
            }
            System.out.println(a + b + c);
        } scanner.hasNextLine() scanner.hasNextLine scanner {
            String[] array = scanner.nextLine().split(" ");
            long a = Integer.parseInt(array[0]);
            long b = Integer.parseInt(array[1]);
            long c = Integer.parseInt(array[2]);
            int k = Integer.parseInt(scanner.nextLine());

            if (a > b && a > c) {
                for (int i = 0; i < k; ++i) {
                    a *= 2;
                }
            } else if (b > c) {
                for (int i = 0; i < k; ++i) {
                    b *= 2;
                }
            } else {
                for (int i = 0; i < k; ++i) {
                    c *= 2;
                }
            }
            System.out.println(a + b + c);
        } String[] array = scanner.nextLine().split(" "); array scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " long a = Integer.parseInt(array[0]); a Integer.parseInt(array[0]) Integer.parseInt Integer array[0] array 0 long b = Integer.parseInt(array[1]); b Integer.parseInt(array[1]) Integer.parseInt Integer array[1] array 1 long c = Integer.parseInt(array[2]); c Integer.parseInt(array[2]) Integer.parseInt Integer array[2] array 2 int k = Integer.parseInt(scanner.nextLine()); k Integer.parseInt(scanner.nextLine()) Integer.parseInt Integer scanner.nextLine() scanner.nextLine scanner if (a > b && a > c) {
                for (int i = 0; i < k; ++i) {
                    a *= 2;
                }
            } else if (b > c) {
                for (int i = 0; i < k; ++i) {
                    b *= 2;
                }
            } else {
                for (int i = 0; i < k; ++i) {
                    c *= 2;
                }
            } a > b && a > c a > b a b a > c a c {
                for (int i = 0; i < k; ++i) {
                    a *= 2;
                }
            } for (int i = 0; i < k; ++i) {
                    a *= 2;
                } int i = 0; int i = 0; i 0 i < k i k ++i ++i i {
                    a *= 2;
                } {
                    a *= 2;
                } a *= 2 a 2 if (b > c) {
                for (int i = 0; i < k; ++i) {
                    b *= 2;
                }
            } else {
                for (int i = 0; i < k; ++i) {
                    c *= 2;
                }
            } b > c b c {
                for (int i = 0; i < k; ++i) {
                    b *= 2;
                }
            } for (int i = 0; i < k; ++i) {
                    b *= 2;
                } int i = 0; int i = 0; i 0 i < k i k ++i ++i i {
                    b *= 2;
                } {
                    b *= 2;
                } b *= 2 b 2 {
                for (int i = 0; i < k; ++i) {
                    c *= 2;
                }
            } for (int i = 0; i < k; ++i) {
                    c *= 2;
                } int i = 0; int i = 0; i 0 i < k i k ++i ++i i {
                    c *= 2;
                } {
                    c *= 2;
                } 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
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        if (scanner.hasNextLine()) {
            String[] array = scanner.nextLine().split(" ");
            long a = Integer.parseInt(array[0]);
            long b = Integer.parseInt(array[1]);
            long c = Integer.parseInt(array[2]);
            int k = Integer.parseInt(scanner.nextLine());

            if (a > b && a > c) {
                for (int i = 0; i < k; ++i) {
                    a *= 2;
                }
            } else if (b > c) {
                for (int i = 0; i < k; ++i) {
                    b *= 2;
                }
            } else {
                for (int i = 0; i < k; ++i) {
                    c *= 2;
                }
            }
            System.out.println(a + b + c);
        }
    }
}