#C1617. Total Stamps Collection

    ID: 44842 Type: Default 1000ms 256MiB

Total Stamps Collection

Total Stamps Collection

In this competition, a group of friends collects stamps over a number of weeks. Each friend has their own weekly stamp collection rate. Given the number of friends, the number of weeks, and the collection rate for each friend, you are to compute the total number of stamps collected by all friends over the entire duration of the competition.

The total number of stamps is calculated by the formula: \(Total\ Stamps = W \times \left(\sum_{i=1}^{F} p_i\right)\), where \(W\) is the number of weeks and \(p_i\) is the weekly stamp collection rate of the i-th friend.

inputFormat

The input is taken from stdin and consists of two lines:

  • The first line contains two integers \(F\) and \(W\): the number of friends and the number of weeks of the competition, respectively.
  • The second line contains \(F\) space-separated integers, where the i-th integer represents the number of stamps collected per week by the i-th friend.

outputFormat

Output a single integer to stdout: the total number of stamps collected by all friends over the \(W\) weeks.

## sample
3 6
2 3 4
54