#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it) #define ALLOF(c) (c).begin(), (c).end() typedef long long ll; int gcd(int a, int b){return (b==0?a:gcd(b,a%b));} int main(){ int N; int g = -1; vector v; cin >> N; rep(i,N){ int a; cin >> a; v.push_back(a); if(g < 0) g = a; else g = gcd(g, a); } int ret = 0; rep(i,N){ ret += v[i]/g; } cout << ret << endl; return 0; }