2500: AtCoder167 B-Easy Linear Program

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:5 Solved:4

Description


Input

A B C K

Output

Print the maximum possible sum of the numbers written on the cards chosen.

Sample Input Copy

2 1 1 3

Sample Output Copy

2