Catering is expensive! Workplace team knows exactly how many people
will come into the office on each of the next
Catering costs
Compute the minimum amount of money that workplace team needs to spend to
feed everyone for the next
Constraints
Subtask 1 [1 point]
Subtask 2 [1 point]
No additional constraints.
Input Specification
The first line contains three integers,
The next line contains
Output Specification
Output the minimum cost in dollars that workplace team will need to spend.
Sample Input 1
2 1 100
10 20
Sample Output 1
40
Sample Explanation 1
If workplace team orders catering for 20 people, then it will cost 20 dollars every day, or 40 dollars in total.
Sample Input 2
2 1 1
10 20
Sample Output 2
30
Sample Explanation 2
If workplace team orders no catering and just buys pizza every day, then it will only cost 30 dollars.
Sample Input 3
1 100000 100000
1000000000
Sample Output 3
100000000000000
Comments