Input
The first line contains the number
N (1<=N<=20) - the number of elements of a one-dimensional array. The second line contains
N integers (all modulo numbers are not greater than 100). The third line is an integer
a.
Imprint
Output one number - the sum of elements that are multiples of the given number
a.
Examples
| # |
Input |
Output |
| 1 |
5
2 4 1 3 6
2 |
12 |
| 2 |
3
1 3 5
3 |
3 |