#include using namespace std; typedef long long ll; typedef vector VI; typedef vector VVI; typedef vector VL; typedef vector VVL; typedef pair PII; #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i) #define REP(i, n) FOR(i, 0, n) #define ALL(x) x.begin(), x.end() #define MOD 1000000007 #define INF (1LL<<25) //33554432 #define PI 3.14159265359 #define EPS 1e-12 //#define int ll signed main(void) { int n, a[105], b[105]; cin >> n; REP(i, n) cin >> a[i]; sort(a, a+n); REP(i, n) b[i] = a[i]; REP(i, n-1) { while(a[i] != 0) { int tmp = a[i]; a[i] = a[i+1] % a[i]; a[i+1] = tmp; } } int ret = 0; REP(i, n) { b[i] /= a[n-1]; ret += b[i]; } cout << ret << endl; return 0; }