题目描述
Problem Statement
There is a programming contest with N problems. For each $i = 1, 2, \ldots, N$, the score for the i-th problem is S_i.
Print the total score for all problems with a score of X or less.
Input
The input is given from Standard Input in the following format:
N X
$S_1 S_2 \ldots S_N$
Output
Print the answer.
Constraints
- All input values are integers.
- $4 \leq N \leq 8$
- $100 \leq S_i \leq 675$
- $100 \leq X \leq 675$
Sample Input 1
6 200
100 675 201 200 199 328
Sample Output 1
499
Three problems have a score of 200 or less: the first, fourth, and fifth, for a total score of S_1 + S_4 + S_5 = 100 + 200 + 199 = 499.
Sample Input 2
8 675
675 675 675 675 675 675 675 675
Sample Output 2
5400
Sample Input 3
8 674
675 675 675 675 675 675 675 675
Sample Output 3
0
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
6 200
100 675 201 200 199 328
样例输出
499