#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <tuple>
#include <numeric>
#include <functional>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef pair<ll, ll> P;
#define rep(i, n) for(ll i = 0; i < n; i++)
#define exrep(i, a, b) for(ll i = a; i <= b; i++)
#define out(x) cout << x << endl
#define exout(x) printf("%.10f\n", x)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define pb push_back
#define re0 return 0
const ll mod = 1000000007;
const ll INF = 1e16;

ll gcd(ll x, ll y) {
    if(y == 0) {
        return x;
    }
    return gcd(y, x%y);
}

// nの約数を昇順に列挙したvectorを返す。計算量はO(√n)
vector<ll> yakusu(ll n) {
    vl res;
    for(ll i = 1; i*i <= n; i++) {
        if(n%i == 0) {
            res.pb(i);
            if(i != n/i) {
                res.pb(n/i);
            }
        }
    }
    sort(all(res));
    return res;  
}

int main() {
    ll n;
    cin >> n;

    ll mi = INF;
    map<ll, ll> mp;
    rep(i, n) {
        ll a;
        cin >> a;
        chmin(mi, a);
        vl v = yakusu(a);
        for(ll d : v) {
            mp[d] = gcd(a, mp[d]);
        }
    }

    ll ans = 0;
    for(auto p : mp) {
        if(p.first > mi) {
            break;
        }
        if(p.first == p.second) {
            ans++;
        }
    }
    
    out(ans);
    re0;
}
#include <bits/stdc++.h>

using namespace std;
#define int long long
#define rep(i,n,m) for(int i=n;i<m;i++)
void solve(){
    priority_queue<int>pq;
    rep(i,0,3){
        int a;
        cin>>a;
       // cout<<a;
        pq.push(a);
    }
    int sum=0;
    sum+=pq.top();
    pq.pop();
    sum+=pq.top();
    cout<<sum<<endl;
    return;
    
    
}
int32_t main()
{
    int t;
   
    t=1;
    while(t--){
        solve();
    }

    return 0;
}
