#include <algorithm>
#include <iostream>
#include <cstdio>
#include <map>
#include <numeric>
#include <cmath>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <complex>
#include <string.h>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <iomanip>
#include <sys/time.h>
#include <tuple>
#include <random>
using namespace std;

#define endl '\n'
#define ALL(v) (v).begin(), (v).end()
#define RALL(v) (v).rbegin(), (v).rend()
#define UNIQ(v) (v).erase(unique((v).begin(), (v).end()), (v).end())

typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
typedef complex<double> comp;
typedef vector< vector<ld> > matrix;
struct pairhash {
public:
    template<typename T, typename U>
    size_t operator()(const pair<T, U> &x) const {
	size_t seed = hash<T>()(x.first);
	return hash<U>()(x.second) + 0x9e3779b9 + (seed<<6) + (seed>>2);
    }
};
const int inf = 1e9 + 9;
const ll mod = 998244353;
const double eps = 1e-8;
const double pi = acos(-1);

int n;
int a[2010];

map<int, int> g;

int gcd(int a, int b) {
    if (b == 0) return a;
    return gcd(b, a%b);
}

vector<int> divisor(int n) {
    vector<int> res;
    for (int i = 1; i * i <= n; i++) {
        if (n % i == 0) {
            res.push_back(i);
            if (i != n/i) res.push_back(n/i);
        }
    }
    return res;
}

int solve() {
    int min_a = inf;
    for (int i = 0; i < n; i++) {
        min_a = min(min_a, a[i]);
    }
    for (int i = 0; i < n; i++) {
        for (int d : divisor(a[i])) {
            if (d > min_a) continue;
            if (g.count(d) == 0) g[d] = 0;
            g[d] = gcd(a[i], g[d]);
        }
    }

    int res = 0;
    for (const auto& v : g) {
        if (v.first == v.second)
            res++;
    }
    return res;
}

void input() {
    cin >> n;
    for (int i = 0; i < n; i++) cin >> a[i];
}
        
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(15);

    input();
    cout << solve() << endl;
}

#include<iostream>
#include<map>
#include<vector>
#include<set>
using namespace std;
typedef long long li;
#define rep(i,n) for(int i=0;i<(n);i++)
#define df 0
template<class T> void print(const T& t){ cout << t << "\n"; }
template<class T, class... Ts> void print(const T& t, const Ts&... ts) { cout << t; if (sizeof...(ts)) cout << " "; print(ts...); }

// map 型
template<class S,class T>
std::ostream& operator<<(std::ostream& os, const map<S,T>& mp){
  for(const pair<S,T>& x: mp){
    cout << "[" << x.first << "]=" << x.second << " ";
  }
  return os;
}

// Container コンテナ型, map以外
template< template<class ...> class Ctn,class T>
std::ostream& operator<<(std::ostream& os,const Ctn<T>& v){
  auto itr=v.begin();
  while(itr!=v.end()){
    if(itr!=v.begin())cout << " ";
    cout << *(itr++);
  }
  return os;
};

int gcd(int a,int b){return (b==0)?a:gcd(b,a%b); }

int main(){
  int n,m; cin >>n >>m;
  map<int,int> mp;
  auto  add=
    [&](int a){
      for(int i=1;i*i<=a and i<=m; i++){
        if(a%i) continue;
        mp[i]=gcd(a,mp[i]);
        if(a/i<=m)mp[a/i]=gcd(a,mp[a/i]);
      }
      if(df)print(a,":",mp);
    };
  
  add(m);
  
  rep(i,n-1){
    int a; cin >>a;
    if(a<m) m=a;
    add(a);
  }
  int cnt=0;
  for(auto p:mp){
    if(p.first>m) break;
    if(p.first==p.second) cnt++;
  }
  print(cnt);
}
