#include using namespace std; #define rep(i, a) for (int i = 0; i < (a); i++) #define rep2(i, a, b) for (int i = (a); i < (b); i++) #define repr(i, a) for (int i = (a) - 1; i >= 0; i--) #define repr2(i, a, b) for (int i = (b) - 1; i >= (a); i--) template bool chmin(T1 &a, T2 b) { return b < a && (a = b, true); } template bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); } typedef long long ll; int main() { int n; cin >> n; vector a(n); rep(i, n) cin >> a[i]; int g = 0; rep(i, n) g = __gcd(g, a[i]); rep(i, n) a[i] /= g; int ans = 0; rep(i, n) ans += a[i]; cout << ans << endl; return 0; }