#MC1004. 资源价值

资源价值

Question Background

Steve has obtained some resources. Please help him calculate the total value of the resources.

Question Description

Input the quantity of each type of resource, and calculate the total quantity of dirt and the total value of all resources. The value of dirt is 1, and the values of other resources are as follows: stone (2), wood (3), and iron ore (5). Output the total quantity of dirt and the total value of resources.

Input Format

The first line contains an integer d (0 ≤ d ≤ 100), representing the quantity of dirt. The second line contains an integer s (0 ≤ s ≤ 100), representing the quantity of stone. The third line contains an integer w (0 ≤ w ≤ 100), representing the quantity of wood. The fourth line contains an integer i (0 ≤ i ≤ 100), representing the quantity of iron ore.

Output Format

The first line outputs the total quantity of dirt. The second line outputs the total value of resources.

Sample Input

10
5
3
2

Sample Output

10
37