Banana 1


Problem Statement

Jackson is head ranger at the zoo, which looks after many manic monkeys.

Every day, Jackson needs to buy enough bananas to placate the monkeys, so they do not start a monkey uprising.

Jackson can only buy bananas in packs of 1010. How much money must Jackson spend?

Input

Your first line of input will contain two space-separated integers, nn and cc: the number of monkeys and the dollar cost for 1010 bananas, respectively.

Next, nn lines will follow, each containing a single integer aia_i: the number of bananas needed to placate monkey ii.

Output

A single line, containing the total cost of bananas Jackson has to buy, in dollars.

Constraints

For all test cases...

  • 1≤n≤1061 \leq n \leq 10^6
  • 1≤c≤1021 \leq c \leq 10^2
  • 1≤ai≤1051 \leq a_i \leq 10^5

Example

Input 1
4 6
15
8
31
42
Output 1
60
Explanation

Jackson needs to buy at least 15+8+31+42=9615+8+31+42=96 bananas.

Jackson will have to buy at least 1010 packs of 1010 bananas (a grand total of 10×10=10010 \times 10 = 100 bananas) to satisfy the need for 9696 banana.

Since each pack of bananas costs 66 dollars, this will cost Jackson a total of 6×10=606 \times 10 = 60 dollars.

Python Template

Code 1
n, c = map(int, input().split())
a = [int(input()) for _ in range(n)]
# Continue your code here and print your final answer!

Solution

If you'd like to view a sample solution to this tutorial question, please click the "Read Editorial" link to the right of the problem!

Comments0


No comments yet

Be the first to comment.

New comment


Log in to join the discussion.