#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #define ll long long #define dou(s) atof(s.c_str()) #define lon(s) atoll(s.c_str()) #define str(n) to_string(n) #define rep(i,a,b) for(ll i=a;i=a;i--) #define ALL(a) a.begin(),a.end() #define rALL(a) a.rbegin(),a.rend() #define fion(n) fixed<=n AND a[lower_bound(ALL(a),n)-a.begin()]==n?lower_bound(ALL(a),n)-a.begin():-1) #define fist(s,t) ((int)s.find(t)) #define START int main(){cin.tie(0);ios::sync_with_stdio(false); #define END } using namespace std; ll gcd(const vector &a){ ll n=a.size(),x,y,k; y=a[0]; rep(i,1,n){ x=y;y=a[i];k=x%y; while(k!=0){x=y;y=k;k=x%y;} } return y; } START ll n;cin>>n; vector a(n); rep(i,0,n)cin>>a[i]; ll k=gcd(a); cout<