p03360 AtCoder Beginner Contest 096 - Maximum Sum
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.

Examples

Input

5 3 11
1


Output

30


Input

3 3 4
2


Output

22
```python
l = list(map(int, input().split()))
k = int(input())

print(max(l)*2**k + sum(l)-max(l))
```