#include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 4000000000000000000 //オーバーフローに注意
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;




//最大公約数
ll gcd(ll x,ll y){

	x = abs(x);
	y = abs(y);

	if(x < y){
		swap(x,y);
	}
	if(y == 0){
		return x;
	}else{
		return gcd(y,x%y);
	}
}

map<ll,ll> MAP;

void func(ll num,ll base){

	auto at = MAP.find(base);
	if(at == MAP.end()){

		MAP[base] = num;
	}else{

		ll tmp = MAP[base];
		MAP[base] = gcd(tmp,num);
	}
}


int main(){

	int N;
	scanf("%d",&N);

	ll A;
	ll mini = HUGE_NUM;

	for(int i = 0; i < N; i++){

		scanf("%lld",&A);
		mini = min(mini,A);

		for(ll k = 1; k*k <= A; k++){
			if(A%k != 0)continue;

			func(A,k);
			func(A,A/k);
		}
	}

	int ans = 1;
	for(auto at = MAP.begin(); at != MAP.end(); at++){

		if(at->first < mini && at->first == at->second){

			ans++;
		}
	}

	printf("%d\n",ans);

	return 0;
}

#include <bits/stdc++.h>
#define rep(i, n) for (ll i=0; i<n; ++i)
#define all(obj) (obj).begin(),(obj).end()
using namespace std;
typedef long long ll;
long long GCD(long long x, long long y) { return y ? GCD(y, x%y) : x; }

int main(){
    ll n;
    cin >> n;
    if(n<=10){
        cout << 0 << endl;
        return 0;
    }
    ll n2 = n;
    ll dig = log10(n);
    n /= pow(10, dig/2+1);

    if(dig%2==0){
        cout << pow(10, dig/2)-1 << endl;
        return 0;
    }
    if(n*pow(10, dig/2+1)+n<=n2){
        cout << n << endl;
    }
    else{
        cout << n-1 << endl;
    }
    return 0;
}
