#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/hash_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

#define LL long long
#define int long long
#define ull unsigned long long
#define fi first
#define se second
#define pll pair<LL, LL>
#define pii pair<int, int>
#define fastio ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#define SZ(x) ((int)(x.size()))
#define LC (id<<1)
#define RC (id<<1|1)

constexpr int N = 1e5+9;
constexpr int M = 998244353;
#ifdef int
constexpr int INF = 0x3f3f3f3f3f3f3f3f;
constexpr int INF2 = 0xcfcfcfcfcfcfcfcf;
#else
constexpr int INF = 0x3f3f3f3f;
constexpr int INF2 = 0xcfcfcfcf;
#endif


signed main() {
    fastio;
    int n;
    cin >> n;
    vector<int> a(n);
    map<int, int> dp;
    for (int& x: a)
        cin >> x;
    int mini = *min_element(a.begin(), a.end());
    for (int& x: a) {
        for (int g1 = 1; g1 * g1 <= x; g1++) {
            if (x % g1 == 0) {
                dp[g1] = __gcd(dp[g1], x);
                int g2 = x/g1;
                if (g1 == g2) continue;
                dp[g2] = __gcd(dp[g2], x);
            }
        }
    }
    int ans = 1;
    for (auto& [x, y]: dp)
        if (x < mini)
            ans += x==y;
    cout << ans << "\n";
    return 0;
}
#include<bits/stdc++.h>

using namespace std;

#define N 2005
#define mod 998244353
#define LL long long

int n, a_min, i, a[N], j, ans;
vector<int> vec;
unordered_set<int> Ans;
map<int,int> A, ext;

int main (void)
{
	scanf("%d",&n);
	a_min=-1;
	for (i=1; i<=n; i++) {
		scanf("%d",&a[i]);
		if (a_min==-1) a_min=a[i];
		else a_min=min(a_min,a[i]);
		vec.clear();
		for (j=1; j*j<=a[i]; j++)
			if (a[i]%j==0) {
				vec.push_back(j);
				if (j*j!=a[i]) vec.push_back(a[i]/j);
			}
		sort(vec.begin(),vec.end());
		ext.clear();
		for (j=vec.size()-1; j>=0; j--) {
			if (ext.count(A[vec[j]])) continue;
			ext[A[vec[j]]]=1;
			Ans.insert(vec[j]);
		}
		for (j=0; j<vec.size(); j++) A[vec[j]]=((LL)A[vec[j]]*n+i)%mod; 
	}
	ans=0;
	for (auto x:Ans) if (x<=a_min) ans++;
	printf("%d\n",ans);
	return 0;
}