#include using namespace std; int gcd(int x,int y){ while(x != y){ if(x > y) x -= y; else x -= y; } return x; } int main(){ long long n; cin >> n; vector a(n); for(auto &x:a) cin >> x; sort(a.begin(),a.end()); int ans = 0, g = a[0]; for(int i = 1; i < n; i++) g = min(g,gcd(g,a[i])); for(int i = 0; i < n; i++) ans += a[i] / g; cout << ans << endl; return 0; }