#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <set>
#include <map>
typedef long long ll;
typedef long double ld;
using namespace std;

const int maxn = 2079;
vector<int> f(maxn, 0);
ll gcd(ll a, ll b)
{
    if (a < b) swap(a, b);
    while (b)
    {
        ll c = a % b;
        a = b;
        b = c;
    }
    return a;
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    vector<ll> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    sort(a.begin(), a.end());
    map<int, vector<int> > d;
    for (int i = 0; i < n; i++)
    {
        for (int j = 1; j * j <= a[i]; j++)
        {
            if (a[i] % j == 0)
            {
                d[j].push_back(i);
                if (j * j < a[i]) d[a[i] / j].push_back(i);
            }
        }
    }
    int ans = 0;
    for (const pair<int, vector<int> >& i : d)
    {
        for (int j : i.second) f[j] = 1;
        int mini = 2e9;
        for (int j = 0; j < n; j++)
        {
            if (!f[j])
            {
                mini = a[j];
                break;
            }
        }
        int g = 0;
        for (int j : i.second) g = gcd(g, a[j]);
        if (g == i.first && mini >= i.first)
        {
            //cout << i.first << " ";
            ans++;
        }
        for (int j : i.second) f[j] = 0;
    }
    //cout << "\n";
    cout << ans << "\n";
    return 0;
}
#include <iostream>
#include <vector>
#include <string>
#include <array>
#include <functional>
#include <algorithm>
#include <stack>
#include <map>
#include <set>
#include <climits>
#include <queue>
#include <bitset>
#include <cassert>
#include <math.h>
#include <complex>
#include <iomanip>
#include <unordered_map>
using namespace std;
#define ll long long
#define pb(x) push_back(x)
#ifdef _OLIMPOLOCAL
    #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
    #define debug(...) 1337
#endif
void debug_out() { cout << "\n";}
template<typename T1, typename... T2> void debug_out(T1 A, T2... B) { cout << " " << A; debug_out(B...); }
int test = 1;
#define out(x) {cout << x << "\n";return;}
#define all(N) N.begin(),N.end()
#define allr(N) N.rbegin(),N.rend()
template<typename T1> 
void print(vector<T1> V, int add = 0, int start = -1, int end = -1) {
    if (start < 0) start = 0;
    if (end < 0) end = V.size() - 1;
    for (int i = start; i <= end; i++) {
        cout << V[i] + add << ((i == end) ? "\n" : " ");
    }
}
template<typename T1> 
T1 chmin(T1 &x, const T1 v) { return x = min(x,v); }
template<typename T1> 
T1 chmax(T1 &x, const T1 v) { return x = max(x,v); }
#define rep(i, n) for (int i = 0; i < n; i++)
#define reps(i, s, n) for (int i = s; i < n; i++)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define repsr(i, s, n) for (int i = n-1; i >= s; i--)
#define PI pair<int,int>
//-------------------------- ^ DONT TOUCH ^-----------------------------------------------------------------
#define MAX 100001
#define MOD 1000000007ll

int gcd(int x, int y) {
    if (x == 0 || y == 0) 
        return x+y;
    return gcd(y, x % y);
}

void solve() {
    int n;
    cin >> n;
    vector<int> N(n);
    rep(i,n) {
        cin >> N[i];
    }
    int m = 35000;
    map<int, int> M;
    int s = INT_MAX;
    rep(i,n) {
        chmin(s, N[i]);
        for(int j = 1; j * j <= N[i]; j++) 
            if ((N[i] % j) == 0) {
            M[j] = gcd(M[j], N[i]);
            M[N[i]/j] = gcd(M[N[i]/j], N[i]);
        }
    }
    int c = 1;
    for(auto &p : M) {
        if (p.first == p.second && p.first < s)
            c++;
    }
    out(c);
}

int main() {
    ios_base::sync_with_stdio(0);cin.tie(0);
    int test = 1;
    //cin >> test;
    rep(testCase, test) {
        #ifdef _OLIMPOLOCAL
            cout << "------------------ TESTCASE: " << testCase << " -------------\n";
        #endif
        solve();
    }
    return 0;
}
