Problem2547--数字求和

2547: 数字求和

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 1  Solved: 1
[Status] [Submit] [Creator:]

Description

给定一个正整数a,以及另外的n个正整数,要求:这 n个整数中,小于a的整数的和是多少? 

Input

第一行是一个两个整数a和n,含义如题目描述。 
第二行是n个小于1000的正整数,每两个数时间用空格隔开 

Output

输出一个正整数,表示 n数中小于a的数的和。

Sample Input Copy

10 5 
1 2 3 4 11 

Sample Output Copy

10

HINT

【数据范围】 
对于50%的数据,n<=100; 
对于100%的数据,n<=1000,a<=2*10^9 

Source/Category

 level2