A - 合格者への拍手 解説 /

実行時間制限: 2 sec / メモリ制限: 1024 MiB

配点 : 200

問題文

高橋君は、プログラミングコンテストの運営スタッフとして、参加者の表彰を担当しています。

今回のコンテストには N 人の参加者がいて、i 番目の参加者の最終スコアは P_i 点です。

高橋君は、最終スコアが K 点以上の参加者全員を表彰することにしました。表彰の際、高橋君は表彰対象の各参加者に対して、その参加者の最終スコアの数値と同じ回数だけ拍手を送ります。例えば、最終スコアが 80 点の参加者には 80 回の拍手を送ります。

高橋君が拍手を送る回数の合計を求めてください。なお、表彰対象の参加者がいない場合、合計は 0 となります。

制約

  • 1 \leq N \leq 10^5
  • 1 \leq K \leq 100
  • 1 \leq P_i \leq 100 (1 \leq i \leq N)
  • 入力はすべて整数

入力

N K
P_1 P_2 \ldots P_N
  • 1 行目には、参加者の人数 N と、表彰の基準となるスコア K が、スペース区切りで与えられる。
  • 2 行目には、各参加者の最終スコア P_1, P_2, \ldots, P_N が、スペース区切りで与えられる。
  • P_ii 番目の参加者の最終スコア(点)を表す。

出力

高橋君が拍手を送る回数の合計を 1 行で出力してください。


入力例 1

5 60
45 72 88 55 60

出力例 1

220

入力例 2

10 50
30 85 42 91 50 67 25 100 48 73

出力例 2

466

入力例 3

15 70
65 78 92 45 70 83 69 100 55 71 88 40 95 62 77

出力例 3

754

Score : 200 pts

Problem Statement

Takahashi is in charge of the award ceremony as a staff member of a programming contest.

There are N participants in this contest, and the final score of the i-th participant is P_i points.

Takahashi decided to award all participants whose final score is K points or more. During the ceremony, Takahashi claps for each awarded participant a number of times equal to that participant's final score. For example, he claps 80 times for a participant whose final score is 80 points.

Find the total number of times Takahashi claps. If there are no participants to be awarded, the total is 0.

Constraints

  • 1 \leq N \leq 10^5
  • 1 \leq K \leq 100
  • 1 \leq P_i \leq 100 (1 \leq i \leq N)
  • All inputs are integers

Input

N K
P_1 P_2 \ldots P_N
  • The first line contains the number of participants N and the threshold score K for the award, separated by a space.
  • The second line contains the final scores P_1, P_2, \ldots, P_N of each participant, separated by spaces.
  • P_i represents the final score (in points) of the i-th participant.

Output

Print the total number of times Takahashi claps in one line.


Sample Input 1

5 60
45 72 88 55 60

Sample Output 1

220

Sample Input 2

10 50
30 85 42 91 50 67 25 100 48 73

Sample Output 2

466

Sample Input 3

15 70
65 78 92 45 70 83 69 100 55 71 88 40 95 62 77

Sample Output 3

754