#include <bits/stdc++.h>
using namespace std;
using uint=unsigned int;
using LL=long long;
using ULL=unsigned long long;
#define rep(i,n) for(uint i=0; i<(n); i++)


uint GCD(uint a,uint b){ return b?GCD(b,a%b):a; }

uint sieve[32768]={};
vector<uint> P;

vector<pair<uint,uint>> factorize(uint N){
  vector<pair<uint,uint>> res;
  for(uint p:P){
    if(N%p) continue;
    if(N<p) break;
    res.push_back({p,0});
    while(N%p==0){ N/=p; res.back().second++; }
  }
  if(N!=1) res.push_back({N,1});
  return move(res);
}
vector<uint> divs(vector<pair<uint,uint>> F){
  vector<uint> res = {1};
  for(auto f:F){
    uint t=res.size() * f.second;
    rep(i,t) res.push_back(res[i] * f.first);
  }
  return move(res);
}

uint N;
uint A[2000];
unordered_map<uint,uint> D;
uint m;

int main(){
  scanf("%u",&N); rep(i,N) scanf("%u",&A[i]);
  m=1000000000; rep(i,N) m=min(m,A[i]);
  for(uint i=2; i<32768; i++) if(!sieve[i]){
    P.push_back(i); sieve[i]=i;
    for(uint p:P) if(p<=sieve[i]) if(i*p<32768) sieve[i*p]=p; else break;
  }
  rep(i,N){
    auto B=divs(factorize(A[i]));
    for(uint d:B){
      uint x=D[d];
      if(x==0) D[d]=A[i];
      else D[d]=GCD(x,A[i]);
    }
  }
  uint ans=0;
  for(auto d:D) if(d.first==d.second) if(d.first<=m) ans++;
  printf("%d\n",ans);
  return 0;
}

#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;

constexpr long long int MOD = 1000000007;
//constexpr int MOD = 1000000007;
//constexpr int MOD = 998244353;
//constexpr long long int MOD = 998244353;
constexpr double EPS = 1e-12;

//int N, M, K, T, H, W, L, R;
long long int N, M, K, T, H, W, L, R;

int gcd(int a, int b) {
	while (b) {
		a %= b;
		swap(a, b);
	}
	return a;
}

unordered_map<int,int> mp;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	cin >> N;
	vector<int>v(N);
	for (auto &i : v)cin >> i;
	sort(v.begin(), v.end());
	for (int i = 0; i < N; i++) {
		if (i&&v[i] == v[i - 1])continue;
		for (int j = 1; j*j <= v[i]; j++) {
			if (j > v[0])break;
			if (v[i]%j)continue;
			if (mp.find(j) == mp.end()) {
				mp[j] = v[i] / j;
			}
			else {
				mp[j] = gcd(mp[j], v[i] / j);
			}
			j = v[i] / j;
			if (j > v[0]) {
				j = v[i] / j;
				continue;
			}
			if (mp.find(j) == mp.end()) {
				mp[j] = v[i] / j;
			}
			else {
				mp[j] = gcd(mp[j], v[i] / j);
			}
			j = v[i] / j;
		}
	}
	int ans = 0;
	for (auto i : mp) {
		if (i.second == 1)ans++;
	}
	cout << ans << endl;
}