#include #include #include int gcd (int a, int b ){ int c; while ( a != 0 ) { c = a; a = b%a; b = c; } return b; } int gc(int n, std::vector v){ if(n == v.size() - 2) return gcd(v[n], v[n + 1]); return gcd(v[n], gc(n + 1, v)); } int main(){ int n; std::cin >> n; std::vector v(n); for(int i = 0; i < n; i++){ std::cin >> v[i]; } if(n == 1){ std::cout << 1 << std::endl; return 0; } std::sort(v.begin(), v.end()); int gcm_value = gc(0, v); int ans = 0; for(int i : v){ ans += i / gcm_value; } std::cout << ans << std::endl; return 0; }