#include using namespace std; #define INF 2000000000 #define MOD 1000000007 typedef long long ll; typedef pair P; int main() { int n; cin >> n; int a[n]; int b[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a, a+n); bool ok = true; for (int i = 0; i < n; i++) { if (a[i]%a[0]==0||a[0]!=1) { b[i] = a[i]/a[0]; } else { ok = false; break; } } int ret = 0; if (ok) { ret = accumulate(b,b+n,0); } else { ret = accumulate(a,a+n,0); } cout << ret << endl; }