n = int(input()) min = 100 sum = 0 list = [] for i in range(n): per = int(input()) if per < min: min = per list.append(per) sum += per isDevide = True for num in range(len(list)): if list[num] % min != 0: isDevide = False break ans = 0 if isDevide == True: for num in range(len(list)): ans += list[num] / min else: ans = sum print(int(ans))