#t75. 约数之和
约数之和
Sum of Divisors
Problem Description
Compute the sum of all numbers, among given natural numbers, that can be divisors of .
Input Format
The first line contains a positive integer .
The second line contains consecutive natural numbers, each not greater than .
The third line contains a positive integer .
Output Format
Output the sum of all numbers among the that are divisors of .
Sample Input 1
5
2 3 2 5 6
30
Sample Output 1
18
Sample Input 2
5
2 3 2 5 6
7
Sample Output 2
0
Hint
Sample 1: 2, 3, 5, 6 are all divisors of 30; among them 2 appears twice, so the sum of all divisors is 18.