/*
-> Don't stop when you're tired, stop when you're done.
-> From the river to the sea, Palestine will be free.
--> @author: MIDORIYA_
*/
//*==============================================================
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<db> vd;
typedef vector<ld> vld;
typedef vector<bool> vb;
typedef vector<vector<ll>> vvl;
typedef vector<vector<int>> vvi;
typedef vector<pii> vii;
typedef set<int> si;
typedef set<ll> sl;
typedef multiset<int> msi;
typedef multiset<ll> msl;
#define pb push_back
#define pf push_front
#define popb pop_back
#define popf pop_front
#define fi first
#define se second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define endl "\n"
const int MOD = 998244353, mod = 1e9 + 7, maxA = 1e5 + 5;
#define time cerr << "Time Taken: " << (float)clock() / CLOCKS_PER_SEC << " Secs";
//*===================>>>FastIO - FileIO<<<=========
void fastIO()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
}
void fileIO()
{
#ifndef ONLINE_JUDGE
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
}
//*===================>>>ONE-FOR-ALL<<<=============
ll GCD(ll a, ll b) {
    return (b == 0 ? a : GCD(b, a % b));
}

ll GCD_Vect(vector<ll> &v) {
    ll ans = v[0];
    for (int i = 1; i < v.size(); i++)
        ans = GCD(ans, v[i]);
    return ans;
}

vector<ll> getDivisors(ll n) {
    vector<ll> divisors;
    for (int i = 1; i * i <= n; i++)
        if (n % i == 0)
            divisors.push_back(i), divisors.push_back(n / i);
    if (sqrt(n) == int(sqrt(n)))
        divisors.push_back(sqrt(n));
    return divisors;
}

void OneForAll()
{

    int n;
    cin >> n;
    vector<ll> v(n);
    for (int i = 0; i < n; i++)
        cin >> v[i];
    ll gcd = GCD_Vect(v);
    ll ans = 0;
    vector<ll> divisors = getDivisors(gcd);
    ans = divisors.size();
    cout << ans << endl;
}

int main()
{
    fastIO();
    // fileIO();

    ll tc = 1, t = 1;
    // cin >> t;
    while (t--)
    {
        // cout << "Case " << tc++ << ": ";
        OneForAll();
    }
    time;
    return 0;
}