Problem:


Score: 200 points

Problem Statement

There are three positive integers A, B and C written on a blackboard. E869120 performs the following operation K times:

Choose one integer written on the blackboard and let the chosen integer be n. Replace the chosen integer with 2n.

What is the largest possible sum of the integers written on the blackboard after K operations?

Constraints

A, B and C are integers between 1 and 50 (inclusive).

K is an integer between 1 and 10 (inclusive).

Input

Input is given from Standard Input in the following format:

A B C
K

Output

Print the largest possible sum of the integers written on the blackboard after K operations by E869220.

Sample Input 1

5 3 11
1

Sample Output 1

30

In this sample, 5, 3, 11 are initially written on the blackboard, and E869120 can perform the operation once.

There are three choices:  

Double 5: The integers written on the board after the operation are 10, 3, 11.

Double 3: The integers written on the board after the operation are 5, 6, 11.

Double 11: The integers written on the board after the operation are 5, 3, 22.

If he chooses 3., the sum of the integers written on the board afterwards is 5 + 3 + 22 = 30, which is the largest among 1. through 3.  

Sample Input 2

3 3 4
2

Sample Output 2

22

E869120 can perform the operation twice. The sum of the integers eventually written on the blackboard is maximized as follows:  

First, double 4. The integers written on the board are now 3, 3, 8.  

Next, double 8. The integers written on the board are now 3, 3, 16.  

Then, the sum of the integers eventually written on the blackboard is 3 + 3 + 16 = 22.



Sample input:
5 3 11
1


Sample output:
30

Submission status: Accepted

Solution code:
A = list(map(int,input().split()))

K = int(input())

print(sum(A)+(max(A)*(pow(2,K)-1)))

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
k=int(input())
a.sort()
print(a[0]+a[1]+(a[2]*pow(2,k)))

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())
t = max(a,b,c)

print(t*(2**k)+a+b+c-t)

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
k=int(input())

a.sort(reverse=True)
for _ in range(k):
    a[0]*=2
print(sum(a))

Submission status: Accepted

Solution code:
import re
import math

if __name__ == '__main__':
    
    a, b, c = [int(x) for x in input().split()]
    k = int(input())

    ns = [a, b, c]
    ns = sorted(ns)
    for i in range(k):
        ns[2] = ns[2]*2

    print(sum(ns))

Submission status: Accepted

Solution code:
n_list = list(map(int, input().split()))
k = int(input())

print(max(n_list) * (2 ** k) - max(n_list) + sum(n_list))

Submission status: Accepted

Solution code:
L = list(map(int,input().split()))
K = int(input())
L.sort()
for i in range(K):
    L[-1] *= 2
print(L[0]+L[1]+L[2])

Submission status: Accepted

Solution code:
N = list(map(int, input().split()))
K = int(input())
print(sum(N) + max(N) * (2 ** K - 1))

Submission status: Accepted

Solution code:
ABC = [int(_) for _ in input().split()]
K = int(input())

a, b, c = sorted(ABC)
print(a + b + c * 2 ** K)

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
n = int(input())

print(max(l) * 2 ** n + sum(l) - max(l))

Submission status: Accepted

Solution code:
array = sorted([int(x) for x in input().split()])

k= int(input())

cnt = array[2]
for i in range(k):
    cnt *= 2

print(array[0]+ array[1] + cnt)

Submission status: Accepted

Solution code:
a=[int(i) for i in input().split()]
k=int(input())
a.sort(reverse=True)
print(a[0]*(2**k)+a[1]+a[2])

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())

s = a + b + c
m = max((a, b, c))
s -= m
m <<= k
s += m
print(s)

Submission status: Accepted

Solution code:
x = [int(i) for i in input().split()]
x.sort()
a = x[0]
b = x[1]
c = x[2]
k = int(input())
print(a+b+c*2**k)

Submission status: Accepted

Solution code:
a,b,c=[int(i) for i in input().split()]
k=int(input())

print(a+b+c-max(a,b,c)+max(a,b,c)*(2**k))

Submission status: Accepted

Solution code:
a , b, c = map(int,raw_input().split())
k = input()
d = max(a,b,c)
e = a + b + c - d
for i in range(k):
    d *= 2
print e + d

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
k = int(input())
for i in range(k):
	mindex = a.index(max(a))
	a[mindex] = a[mindex]*2
print(sum(a))

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
a.sort()
k = int(input())
a[2] *= 2 ** k
print(sum(a))

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())
print(max(a,b,c) * 2**k + (a+b+c) - max(a,b,c))

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())

d = max(a, b, c)
print(a + b + c + (d * (2 ** k)) - d)

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
k = int(input())
m = max(l)
print(sum(l) - m + (m*2**k))

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
k=int(input())

print(max(a,b,c)*(2**k-1)+a+b+c)

Submission status: Accepted

Solution code:
abc = list(map(int, input().split()))
k = int(input())
abc.sort()
print(abc[-1]*2**k+abc[0]+abc[1])

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
K = int(input())
m = max(A,B,C)
e = (A+B+C) - m
print(m*(2**K)+e)

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())
print(max(a, b, c)*((2**k)-1) + a + b + c)

Submission status: Accepted

Solution code:
l=[int(x) for x in input().split()]
l.sort()
k=int(input())
for i in range(k):
    l[-1]*=2
print(sum(l))

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

a, b, c = na()
k = ni()
print((max(a, b, c) << k) - max(a, b, c) + a + b + c)

Submission status: Accepted

Solution code:
# coding: utf-8
a,b,c=map(int,input().split())
k=int(input())
print(max(a,b,c)*(2**k)+a+b+c-max(a,b,c))

Submission status: Accepted

Solution code:
src = list(map(int,input().split()))
K = int(input())
src.sort()
ans = src[0]+src[1]+ src[2]*2**K
print(ans)

Submission status: Accepted

Solution code:
list = list(map(int,input().split()))
k = int(input())
x = max(list)
a = 2**k
print(sum(list)+x*a-x)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def inpl(): return map(int, input().split())
N = list(inpl())
K = int(input())
print(sum(N) + max(N)*(2**K - 1))

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
n = int(input())
u = max(a,b,c)
e = a+b+c-max(a,b,c)
for i in range(n):
    u *= 2
print(e + u)

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
ans = max(a)*(2**int(input()))
ans += sum(a)
ans -= max(a)
print(ans)

Submission status: Accepted

Solution code:
l = list(map(int,input().split()))
k = int(input())
for i in range(k):
    a = max(l)
    i = l.index(a)
    l[i] = l[i] * 2
print(sum(l))

Submission status: Accepted

Solution code:
A = sorted(map(int, input().split()))
print(sum(A[:2]) + A[-1]*2**int(input()))

Submission status: Accepted

Solution code:
a, b, c = list(map(int, input().split()))
k = int(input())

m = max(a, b, c)
print(a + b + c - m + (m << k))

Submission status: Accepted

Solution code:
A = sorted(map(int, raw_input().split()))
k = input()
for i in xrange(k):
    A[-1] *= 2
print sum(A)

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
k = int(input())
print(a+b+c + pow(2,k)*max(a,b,c)-max(a,b,c))

Submission status: Runtime Error

Solution code:
a = [int(x) for x in input().split()]
k = int(input())
print(sum(a) + max(a) * (2 ** (K - 1)))

Submission status: Runtime Error

Solution code:
l = list(map(int, input().split()))
k = int(input())
l = sorted(l, reversed=True)
for i in range(k):
  l[0] = l[0]*2
print(sum(l))

Submission status: Runtime Error

Solution code:
l = map(int, input().split())
k = int(input())
l = sorted(l, reversed=True)
for i in range(k):
  l[0] = l[0]*2
print(sum(l))

Submission status: Runtime Error

Solution code:
import math
a = int(input())
b = math.ceil(a/2)
print(b-1)

Submission status: Runtime Error

Solution code:
a=list(map(int,input().split()))
b=int(input())
a.sort()
print(a[0]+a[1]+(a[2]*(2**b))

Submission status: Runtime Error

Solution code:
a=list(map(int,input().split()))
b=int(input())
a.sort()
print(a[0]+a[1]+(a[2]*2**b)

Submission status: Runtime Error

Solution code:
abc = list(map(int, input().split()))
k = int(input())
mx = abc.pop(max(abc))
print(mx * k + sum(abc))

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())

x=max(a,b,c)

print((a+b+c)-x+x*(2**k))

Submission status: Runtime Error

Solution code:
a = map(int, input().split())
k = int(input())

a.sort()
a[-1] *= 2 ** k

print(sum(a))

Submission status: Runtime Error

Solution code:
ls = map(int,input().split())
K = int(input())
ls.sort()
ans = ls[0]+ls[1]+ls[2]*2**K
print(ans)

Submission status: Runtime Error

Solution code:
A=list(map(int,input().split()))
K=int(input())
A.sort(reverse=True)
ans=sum(A)
for i in range(K):
  ans+=A[i]
print(ans)

Submission status: Runtime Error

Solution code:
if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    n = int(input())
    a.sort()
    a[2] = a[2]*(2**n)
    print(su

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
k =int(input())
m = list[a,b,c]
maxm =max(m)
maxm =maxm*(2**k)
max(m)=maxm
print(sum(m))

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split())).sort()
k = int(input())
print(a[0]+a[1]+a[2]*(2**k))

Submission status: Runtime Error

Solution code:
5 3 11
1
---
30
===
3 3 4
2
---
22
===

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split())
K = int(input())
array = []
for i in range(3):
    array[i] = [A,B,C]

for i in range(3):
    array[i][i] *= 2**K

print(max(sum(array[0],array[1],array[2])))

Submission status: Runtime Error

Solution code:
A = list(map(int,input().split()))
A.sort()
k = int(input())
ans = sum(A[:2]) + A[3]*(2**k)
print(ans)

Submission status: Runtime Error

Solution code:
A = list(map(int,input().split()))
A.sort()
k = int(input())
ans = sum(A[:2]) + A[3]*(2**k)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
k=int(input())
print((max(a,b,c)*(2**k))+(a+b+c)-max(a,b,c)

Submission status: Runtime Error

Solution code:
def f(a, b, c, k):
    abc = sorted([a, b, c])
    abc[2] *= 2 * k
    print(sum(abc))


f(map(int, input().split()), int(input()))

Submission status: Runtime Error

Solution code:
num = list(map(int, input().split())
k = int(input())
print(max(num)*(2**k-1)+sum(num))

Submission status: Runtime Error

Solution code:
List = sorted([int(i) for i in input().split(" ")],reversed=True)
K = int(input())
List[0] = List[0]*(2**K)
print(sum(List))

Submission status: Runtime Error

Solution code:
l = list(map(int,input().split()))
k = int(input())
L =l.sorted()
print(l[0]+l[1]+l[2]*(k*2))

Submission status: Runtime Error

Solution code:
l = list(map(int,input().split()))
k = int(input())
L =l.sorted()
print(int(l[0])+int(l[1])+int(l[2])*k)

Submission status: Runtime Error

Solution code:
l = list(map(int,input().split()))
k = int(input())
L =l.sorted()
print(l[0]+l[1]+l[2]*k)

Submission status: Runtime Error

Solution code:
line = input()
num_a, num_b, num_c = [int(n) for n in line.split()]
 num_k =  [int(n) for n in line.split()][0]
numbers = [num_a, num_b, num_c]
numbers.sort(reverse=True)
numbers[0] *= 2**num_k
print(sum(numbers))

Submission status: Runtime Error

Solution code:
line = input()
a, b, c, k = [int(n) for n in line.split()]
numbers = [a, b, c]
numbers.sort(reverse=True)
numbers[0] *= 2 ** k
print(sum(numbers))

Submission status: Runtime Error

Solution code:
line = input()
num_a, num_b, num_c, num_k = [int(n) for n in line.split()]
numbers = [num_a, num_b, num_c]
numbers.sort(reverse=True)
numbers[0] *= 2**num_k
print(sum(numbers))

Submission status: Runtime Error

Solution code:
line = input()
num_a, num_b, num_c, num_k = [int(n) for n in line.split()][0]
numbers = [num_a, num_b, num_c]
numbers.sort(reverse=True)
numbers[0] *= 2**num_k
print(sum(numbers))

Submission status: Runtime Error

Solution code:
A= input()
B= input()
C= input()
K= input()
u = max(A,B,C)
print(A+B+C+(2**K-1)*u)

Submission status: Runtime Error

Solution code:
line = input()
A, B, C, K = [int(u) for u in line.split()]
u = max(A,B,C)
print(A+B+C+(2**K-1)*u)

Submission status: Runtime Error

Solution code:
line = input()
A, B ,C , K = [int(u) for u in line.split()]
u=[A,B,C]
j = max(u)
u.remove(j)
u.append(j*2**K)
print(sum(u))

Submission status: Runtime Error

Solution code:
line = input()
A, B, C,K = [int(u) for u in line.split()]
u=[A,B,C]
j = max(u)
u.remove(j)
u.append(j*2**K)
print(sum(u))

Submission status: Runtime Error

Solution code:
line = input()
A, B, K = [int(u) for u in line.split()]
u=[A,B,C]
j = max(u)
u.remove(j)
u.append(j*2**K)
print(sum(u))

Submission status: Runtime Error

Solution code:
line = input()
A, B, X = [int(u) for u in line.split()]
u=[A,B,C]
j = max(u)
u.remove(j)
u.append(j*2**K)
print(sum(u))

Submission status: Runtime Error

Solution code:
ABC = sorted(map(int, input().split()))
K = int(input().split())
print(sum(ABC[:2] + ABC[-1:]*2**K))

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
k = int(input())

m = max(a, b, c)
ans = sum(a, b, c) - m + (2**k) * m

print(ans)

Submission status: Runtime Error

Solution code:
num = [input(), input(), input()]
k = int(input())

m = max(num)
ans = sum(num) - m + 2**k * m

print(ans)

Submission status: Runtime Error

Solution code:
a,b,=map(int,input().split()) 
k=int(input()) 
print((max([a,b,c]))*(2**k-1)+sum([a,b,c]))

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
k=int(input())
print((max(a,b,c))*2*k+sum(a,b,c))

Submission status: Runtime Error

Solution code:
#include <iostream>

using namespace std;

int main() {
    int abc[3];
    int x;
    for (int i=0; i<3; i++) cin >> abc[i];
    cin >> x;
    sort(abc, abc+3);

    cout << abc[0] + abc[1] + abc[2] * (1<<x) << endl;
}

Submission status: Runtime Error

Solution code:
li=list(map(int,input().split())).sort()
a=li.pop(-1)
k=int(input())
a=a*(2**k)
for i in li:
  a+=i
print(a)

Submission status: Runtime Error

Solution code:
A,B,C=map(int,input().split())
K=int(input())

m=max(A,B,C)
print((2**K)*m + (A+B+C-m)

Submission status: Runtime Error

Solution code:
a,b,c=map(int, input().split())
ans = a+b+c
m = max(a, max(b,c))
ans += (pow(2,K)-1) * m
print(ans)

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input().split())
k = int(input())

lis = list(a,b,c)
lis.sort()
maxi = lis[-1]
print(lis[0]+lis[1]+k*maxi)

Submission status: Runtime Error

Solution code:
a,b,c,k=map(int,input().split()),int(input())
print((a+b+c-max(a,b,c))+max(a,b,c)*2**k)

Submission status: Runtime Error

Solution code:
a=list(map(int,input().split()))
for _ in range(int(input()):
  a.sort()
  a[2]*=2
print(sum(a))

Submission status: Runtime Error

Solution code:
ABC = sorted(list(map(int,input().split())))
K = int(input())

print(sum(ABC[:2]) + (ABC[-1] * 2( **  K))

Submission status: Runtime Error

Solution code:
N = [int(a) for a in input().split()]
N.sort()
K = int(input())
print(A[0] + A[1] + A[2] * 2 ** K)

Submission status: Runtime Error

Solution code:
ABC = list(map(int, input().split()))

ABC_1 = sorted(ABC)

ABC_1[-1] = ABC_1[-1]*2**K

print(sum(ABC_1))

Submission status: Runtime Error

Solution code:
num = list(map(int,input().split()))
K = int(input())
A = max(num)
A.sort()
for i in range(K):
  A *= 2
print(sum(num)-num[-1]+A)

Submission status: Runtime Error

Solution code:
import numpy as np
A=  np.array(list(map(int, input().split())))
n = int(input())
f = np.argmax(A)c
A[f] = A[f]*2**n
print(A.sum())

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
k = int(input())
print(sum(a,b,c)+(max(a,b,c)*(2**k-1)))

Submission status: Runtime Error

Solution code:
a=list(map(int,input().split()))
K=int(input)
maxa=a.pop(a.index(max(a)))
print((maxa*(2**K))+sum(a))

Submission status: Runtime Error

Solution code:
A,B,C = [int(x) for x in input().split()]
K = int(input())
ma = max(A,B,C)
mb = ma*2**K
print(sum(A,B,C)-ma+mb)

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
print(max(a,b,c)*2**k + (a+b+c-max(a,b,c)))

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())
K = int(input())
result = sum(A, B, C)
t = max(A, B, C)
result += (t << K) - t
print(result)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
k=int(input())

print(sum(a,b,c)-max(a,b,c)+max(a,b,c)*(2**k))

Submission status: Runtime Error

Solution code:
calc_lsit = list(map(int,input().split()))
k = int(input())

calc_list = sorted(calc_list)
Answer = calc_list[0] + calc_list[1] + calc_list[2]**k
print(Answer)

Submission status: Runtime Error

Solution code:
calc_lsit = list(map(int,input().split()))
k = int(input())

calc_list = [a, b, c]
calc_list = sorted(calc_list)
Answer = calc_list[0] + calc_list[1] + calc_list[2]**k
print(Answer)

Submission status: Runtime Error

Solution code:
A,B,C = map(int, input().strip().split(' '))
K = int(input().strip())

print(sum(A,B,C)+max(A,B,C)*((2**K)-1))

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
k = int(input())
ans = max(a,b,c)
for i in range(k):
  ans = ans + ans
print(ans+min(a,b,c)+a+b+c-max(a,b,c)-min(a,b,c)

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
k = int(input())
ans = max(a,b,c)
for i in range(k):
  ans = ans × 2
print(ans)

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
k = int(input())
ans = max(a,b,c)
for i in range(k):
  ans = ans×2
print(ans)

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
k = int(input())
ans = max(a,b,c)
for i in range(k):
  ans ×= 2
print(ans)

Submission status: Runtime Error

Solution code:
x = int(input())
ans = 0
power = 0
for b in range(2,x+1):
    p = 2
    while True:
        power = b ** p
        if power > x:
            break
        else:
            ans = max(ans,power)
            p += 1
print(ans)

Submission status: Runtime Error

Solution code:
abc = sorted(list(map(int, input().split())))
k = int(input())

print(a + b + c * (2 ** k))

Submission status: Runtime Error

Solution code:
A, B, C = [int(x) for x in input().split()]
print(max(A, B, C)　*　(２ **int(input())) + sum(A, B, C) - max(A, B, C))

Submission status: Runtime Error

Solution code:
A,B,C=map(int,input().split())
K=int(input())

print(A+B+C+max(A,B,C)*(2**K-1)

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
K = int(input())
print(sum(a, b, c) + max(a, b, c)*K)

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
K = int(input())
print(sum(a, b, c) + max(a, b, c)*(K-1))

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
k = int(input())

for i in range(k):
    maxnum = max(a, b, c)
    if maxnum == a:
        a *= 2
    elif maxnum == b:
        b *= 2
    elif maxnum == c:
        c *= 2
print(sum(a, b, c))

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input(),split())
k = int(input())
m = max(a,b,c)
ans = a+b+c-m
abs += m * (2**k)
print(ans)

Submission status: Runtime Error

Solution code:
a, b, c = sorted([ int(v) for v in input().split() ])
n = int(input())
print(a+b+c*(2**k))

Submission status: Runtime Error

Solution code:
abc = [input(x) for x in input().split()]
k = int(input())

m = max(abc)

for i in ragne(k):
    m  *= 2

print(sum(abc)+m-max(abc))

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split())
K = int(input())
L = max(A,B,C)
if L ==A:
print((A*(2**K))+B+C
elif L ==B:
print(A+(B*(2**K))+C)
else:
print(A+B+(C*(2**K)))

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split(' '))
K = int(input())

for i in range(K):
  max = max(A,B,C)
  max *= 2
print(A+B+C)

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split())
K = int(input())

X = [A,B,C]
for i in range(K):
  max(X) *= 2

print(sum(X))

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
k = int(input())
x = map(a,b,c)
print(x*(2**k) + a + b + c - x)

Submission status: Runtime Error

Solution code:
# ABC096B - Maximum Sum
a, b, c = sorted(list(map(int, input().rstrip().split())), reverse=True)
k = int(input())
if k == 1:
    print(a * 2 + b + c)
else:
    for i in range(1, k + 1):
        A = a * 2 + b + c
        B = a + b * 2 ++ c
        C = a + b + c * 2
        if max(A, B, C) == A:
            a *= 2
        elif max(A, B, C) == B:
            b *= 2
        else:
            c *= 2
	print(a + b + c)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
k=int(input())
print(sum(a,b,c)-max(a,b,c)+max(a,b,c)**k)

Submission status: Runtime Error

Solution code:
a=list(int(input().split()))
k=int(input())
a.sort()
sum=0
for i in k:
    a[2]*=2
sum+=a[0]
sum+=a[1]
sum+=a[2]
print(sum)

Submission status: Runtime Error

Solution code:
a=list(int(input()).split)
k=int(input())
a.sort()
sum=0
for i in k:
    a[2]*=2
sum+=a[0]
sum+=a[1]
sum+=a[2]
print(sum)

Submission status: Runtime Error

Solution code:
a=[int(input()).split()]
k=int(input())
a.sort()
sum=0
for i in k:
    a[2]*=2
sum+=a[0]
sum+=a[1]
sum+=a[2]
print(sum)

Submission status: Runtime Error

Solution code:
a=[int(input()).split()]
k=int(input())
a.sort()
sum=0
for i in k:
    a[2]＊=2
sum+=a[0]
sum+=a[1]
sum+=a[2]
print(sum)

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())
K = int(input())

biggest = max([A, B, C])
print(biggest * 2 ** K + sum(A, B, C) - biggest)

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())
K = int(input())

biggest = max(A, B, C)
print(biggest * 2 ** K + sum(A, B, C) - biggest)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
n=int(input())
arr=[a,b,c]
arr=sort(arr)
print(arr[0]+arr[1]+arr[2]*(2**n))

Submission status: Runtime Error

Solution code:
A, B, C = list(map(int, input()))
K = int(input())

ans = max(A, B, C) * (2 ** K)

print(ans)

Submission status: Runtime Error

Solution code:
A, B, C = list(map(int, input()))
K = int(input())

ans = max(A, B, C) * (2 ** K)

Submission status: Runtime Error

Solution code:
x=list(map(int,input().split())),int(input());print(sum(a)+max(a)*((2**x)-1)

Submission status: Runtime Error

Solution code:
a,x=list(map(int,input().split()),int(input());print(sum(a)+max(a)*((2**x)-1)

Submission status: Runtime Error

Solution code:
lst=[map(int,input().split())]
k=int(input())
ans=max(lst)*(2**k)
print(ans)

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input()split())
k=int(input())
d = max([a,b,c])
print(a+b+c-d+(2**k)*d)

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input()split())
k=int(input())
d = max(a,b,c)
print(a+b+c-d+(2**k)*d)

Submission status: Runtime Error

Solution code:
list = list(map(int, input()))
k = int(input())

print(max(list)*(2*k))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    A,B = map(int, lines.pop(0).split(' '))
    if A <= B:
        print(A)
    else:
        print(A-1)
#
# main
#
lines = [x.strip() for x in sys.stdin.readlines()]
#
 # solve !!
#
solve(lines)

Submission status: Runtime Error

Solution code:
L = list(map(int,input().split()))
K = int(input())
m = max(L)
print(L-m + m* (2 ** K))

Submission status: Runtime Error

Solution code:
L = list(map(int,input().split()))
K = int(input())
m = max(L)
print(L-m + m* (2 ** k))

Submission status: Runtime Error

Solution code:
L = list(map(int,input().split()))
K = int(input())
max = max(L)
print(L-max + max* (2 ** k))

Submission status: Runtime Error

Solution code:
L = map(int,input().split())
K = int(input())
max = max(L)
print(L-max + max* (2 ** k))

Submission status: Runtime Error

Solution code:
n=map(ijnt,input().split())
k=int(input())
n.sort(reverse=True)
print(n[0]*(2**k)+n[1]+n[2])

Submission status: Runtime Error

Solution code:
n=map(ijnt,input().split())
k=int(input())
n.sort(reverse=True)
print(n[0]*k+n[1]+n[2])

Submission status: Runtime Error

Solution code:
a, b, c = sorted(map(int, input().split()), reverse=True)
k = int(intpu())
print(a*2**k + b + c)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
A,B,C = int(input())
K = int(input())
S = max(A,B,C) #入力された整数の最大のものを選ぶ
L = [A,B,C] #入力された整数のリスト化
L.remove(S)
L = sum(L + S)

Submission status: Runtime Error

Solution code:
a,b,c = list(map(int, input().split()))
k = int(input())
m = max(a,b,c)
l = m
for i in range(k):
    l *= 2
print(sum([a,b,c].remove(m))+l)

Submission status: Runtime Error

Solution code:
a,b,c,k=map(int,input().split())
maxn=max(a,max(b,c))

for i in range(k):
    maxn*=2
    
if a>b & a>c:
    print(maxn+b+c)
elif b>a & b>c:
    print(maxn+a+c)
else:
    print(maxn+a+b)

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
k = int(input())
a.sort(reverse = True)
a[0] = a*2**k
print(sum(a))

Submission status: Runtime Error

Solution code:
K=int(input())

print(A+B+C+(2**K-1)*max(A,B,C))

Submission status: Runtime Error

Solution code:
A,B,C=list(map(int,input()))
K=int(input())

print(A+B+C+(2**K-1)*max(A,B,C))

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
a.sort()
K = int(input())
 
print(a[2]*(2**k) + a[1] + a[0])
a = list(map(int, input().split()))
a.sort()
K = int(input())

print(a[2]*(2**K) + a[1] + a[0])

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
a.sort()
K = int(input())

print(a[2]*(2**k) + a[1] + a[0])

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
k = int(input())
for i in range(k):
  if a >= b and a >= c:
    a *= 2
  elif b >= a and b >= c:
    b *= 2
  else:
    c *= 2
print(sum(a, b, c))

Submission status: Runtime Error

Solution code:
package main

import (
	"fmt"
	"math"
)

func max(a, b int) int {
	if a >= b {
		return a
	}
	return b
}

func main() {
	var a, b, c, k int
	fmt.Scan(&a, &b, &c, &k)
	m := max(a, max(b, c))
	p := m * int(math.Pow(2, float64(k)))

	fmt.Println(a + b + c + p - m)
}

Submission status: Runtime Error

Solution code:
a=input().split()
b=input()
c=[int(i) for i in a]
d=0
for j in c:
  d+=j
d=d-max(c)
d=d+(max(c))*(2**b)

Submission status: Runtime Error

Solution code:
A, B, C = map(int,inpput()split())
K = int(input())
print(A + B + C - max(A,B,C) + max(A,B,C)*(2**K))

Submission status: Runtime Error

Solution code:
a,b,c = map(int(), input().split())
k = int(input())
kk=2**k
m = max([a,b,c])
al = a+b+c-m+kk*m
print(al)

Submission status: Runtime Error

Solution code:
a,b,c = map(int(), input().split())
k = int(input())
kk=2**k
m = max(a,b,c)
al = a+b+c-m+kk*m
print(al)

Submission status: Runtime Error

Solution code:
a,b,c = map(int(), input().split())
k = int(input())

m = max(a,b,c)
al = a+b+c-m+m*2**k
print(al)

Submission status: Runtime Error

Solution code:
a,b,c = map(int(), input().split())
k = int(input())

m = max(a,b,c)
al = a+b+c-m+m**K
print(al)

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split())).sorted(reversed=True)
N = int(input())
print((2 ^ N) * a[0] + a[1] + a[2])

Submission status: Runtime Error

Solution code:
a,b,c = list(map(int,input().split()))
k = input()

BIG = max(a,b,c)
if BIG == a:
  print(BIG*(2**k)+b+c)
elif BIG == b:
  print(BIG*(2**k)+a+c)
else:
  print(BIG*(2**k)+a+b)

Submission status: Runtime Error

Solution code:
a,b,c,k = [int(i) for i in input().split()]

max = max(a,b,c)
tmp = a+b+c - max

for i in range(k):
    max = max*2

print(tmp+max)

Submission status: Runtime Error

Solution code:
a, b, c, k = map(int, input().split())
list = []
list.extend([a,b,c])
list.sort()
ans = 0

for i in range(k):
    ans = list[0]*2
    list[0] = ans
    list.sort()
    i += 1

print(sum(list))

Submission status: Runtime Error

Solution code:
# a, b = map(int, input().split())
# x = a if a <= b else a-1
# print(x)

x = list(map(int, input().split()))
k = int(input())
y =max(x)
for num in range(k)
  y = y*2
print(y + sum(x) - y)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
k=int(input())
#if 0<k<11 and 0<a<=50 and 0<b<=50 and 0<c<=50: 
    l=[a,b,c]
    l.reverse()
    l[0]=l[0]*(2**k)
#else:
#    print("No")
print(sum(l))

Submission status: Runtime Error

Solution code:
numbers = list(map(int, input().split()))
k = int(input())

for i in range(3):
  if i == numberes.index(max(numbers)):
    sum += max(numbers) * k
  else:
    sum += numbers[i]
print(sum)

Submission status: Runtime Error

Solution code:
m, d = map(int, input().split())

if d >= m:
  print(m)
else:
  print(m-1)

Submission status: Runtime Error

Solution code:
a, b, c = input().split()
a = int(a)
b = int(b)
c = int(c)

k = input()
k = int(k)

ans = 0

if max(a,b,c) = a:
  ans = ans + b + c
elif max(a, b, c) == b:
  ans = ans + a + c
elif max(a, b, c) == c:
  ans = ans + a + b

print(ans + max(a, b, c) * 2 * k)

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
    abc = input().replace("　", " ").split(" ")
    import pdb;pdb.set_trace()
    abc = [int(x) for x in abc]
    abc.sort(reverse=True)
    k = int(input())
    print(abc[0] * (2**k) + abc[1] + abc[2])

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
    abc = input().replace("　", " ").split(" ")
    abc = [int(x) for x in abc].sort(reverse=True)
    k = int(input())
    print(abc[0] * (2**k)

Submission status: Runtime Error

Solution code:
a,b,c,k=map(int,input().split()),int(input())
print(max(a**k+b+c,a+b**k+c,a+b+c**k))

Submission status: Runtime Error

Solution code:
x=list(map(int,input().split()));x.sort();print(x[0]+x[1]+x[2]*2**int(input())

Submission status: Runtime Error

Solution code:
p=input;a=[i for i in p().split()];print(sum(a)+max(a)*2**int(p()))

Submission status: Runtime Error

Solution code:
p=input;a=map(int,p().split());print(sum(a)+max(a)*2**int(p()))

Submission status: Runtime Error

Solution code:
x= list(map(int,input().split()))
k = int(input())
list.sort()
max = list[0] + lsit[1] + list[2] *2*k
 
print(max)

Submission status: Runtime Error

Solution code:
s = list(map(int, input().split()))
K = int(input())
s = sorted()
for i in range(K):
    s[2] *= 2
print(sum(s))

Submission status: Runtime Error

Solution code:
h , w = (int(i) for i in input().split())
a =[]
dy = [0, 0, 1, -1]
dx = [1, -1, 0, 0]


for i in range(h):
    a.append(input())
    
f = True
def check(x,y):
    if a[x][y] =='.':
        return True
    for n in range(4):
        i = dx[n]
        j = dy[n]
#        print(a[x+i][y+j])
        if 0 <= x+i < w and 0 <= y + j < h and a[x+i][y+j]=='#':
            #print(x+i,y+j)
            return True
    return False
#print(check(0,3))
f = True
for i in range(w):
    for j in range(h):
        l = check(i,j)
        if not(l) and f:
            print ("No")
            f = False
if(f):
    print("Yes")

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

tmp=list(map(int,input().split()))
tmp_list.sort()
K=int(input())
ans=tmp[0]+tmp[1]+(tmp[2]*(2**K))
print(ans)