2011 - 满足条件的数的累加

现有n个整数,将其中个位数值为k的数进行累加求和。

Input

第一行2个整数n、k,以空格隔开。(0<n<1000,0<=k<=9)

第二行n个非负整数,以空格隔开,每个数不大于100,000

Output

一个整数

Examples

Input

10 7
2 5 7 17 11 18 4 27 1 7

Output

58

Source

CIE等级考试

Time Limit 1 second
Memory Limit 64 MB
Discuss Stats
上一题 下一题