using System.Collections;
public static void Main()
Console.WriteLine(getTotalX(a, b));
static int getTotalX(int[] a, int[] b) {
ArrayList list = new ArrayList();
for(int i = 1; i <= b[0]; i++)
for(int c = 0; c < a.Length; c++)
for(int x = 0; x < list.Count; x++)
for(int y = 0; y < b.Length; y++)
if(b[y] % Convert.ToInt32(list[x]) == 0)