#include <bits/stdc++.h>

using namespace std;

void solve()
{
    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++)
        cin >> a[i];
    int it = *min_element(a.begin(), a.end());
    unordered_map<int, int> mp;
    auto add = [&](int x, int val) {
        if (x >= it)
            return;
        if (!mp.count(x))
            mp[x] = val;
        else
        {
            mp[x] = __gcd(val, mp[x]);
        }
    };
    for (int t : a)
    {
        for (int j = 1; j * j <= t; j++)
            if (t % j == 0)
            {
                add(j,t);
                add(t / j,t);
            }
    }
    int ans = 1;
    for (auto [i, j] : mp)
        if (i == j)
            ans++;
    cout << ans << endl;
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int T = 1;
    while (T--)
    {
        solve();
    }
}
#include "bits/stdc++.h"
//#include "atcoder/all"
using namespace std;
//using namespace atcoder;
//using mint = modint1000000007;
//const int mod = 1000000007;
//using mint = modint998244353;
//const int mod = 998244353;
//const int INF = 1e9;
//const long long LINF = 1e18;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(i,l,r)for(int i=(l);i<(r);++i)
#define rrep(i, n) for (int i = (n-1); i >= 0; --i)
#define rrep2(i,l,r)for(int i=(r-1);i>=(l);--i)
#define all(x) (x).begin(),(x).end()
#define allR(x) (x).rbegin(),(x).rend()
#define endl "\n"

long long gcd(long long a, long long b) {
	if (b == 0) return a;
	else return gcd(b, a%b);
}
long long lcm(long long x, long long y) {
	return x * y / gcd(x, y);
}
map<long long, long long>mp;
//約数列挙
void calc(long long N) {
	for (long long i = 1; i <= sqrt(N); i++) {
		if (0 == N % i) {
			mp[i] = gcd(mp[i], N);
			if (N != i * i) {
				mp[N / i] = gcd(mp[N / i], N);
			}
		}
	}
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int N;
	cin >> N;
	vector<long long>A(N);
	rep(i, N) {
		cin >> A[i];
	}
	long long minA = 1e18;
	rep(i, N) {
		minA = min(minA, A[i]);
	}
	rep(i, N) {
		calc(A[i]);
	}
	int ans = 0;
	for (auto p : mp) {
		if ((p.first <= minA) && (p.first == p.second)) {
			ans++;
		}
	}
	cout << ans << endl;
	return 0;
}