#include using namespace std; #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it) #define ALLOF(c) (c).begin(), (c).end() typedef long long ll; typedef unsigned long long ull; vector divisor(int n){ vector ret; for(int i=1; i*i<=n; i++){ if(n%i==0){ ret.push_back(i); if(i!=n/i) ret.push_back(n/i); } } //sort(ret.begin(), ret.end()); return ret; } int gcd(int a, int b){return (b==0?a:gcd(b,a%b));} int main(){ int N; cin >> N; vector v; map memo; rep(i,N){ ll a; cin >> a; v.push_back(a); vector div = divisor(a); rep(j,div.size()){ memo[div[j]] = 1; } } map inv; vector w; FOR(it,memo){ w.push_back(it->first); inv[it->first] = w.size()-1; } vector> dp(N+1, vector(w.size(), 0)); rep(i,N){ int a = v[i]; rep(j,w.size()){ int b = w[j]; dp[i+1][j] += dp[i][j]; if(dp[i][j] > 0){ dp[i+1][inv[gcd(a,b)]] += dp[i][j]; } } dp[i+1][inv[a]]++; } /* rep(i,dp.size()){ rep(j,dp[i].size()){ cout << dp[i][j] << " "; } cout << endl; } */ ll ret = 0; REP(i,1,dp[N].size()) ret += dp[N][i]; cout << (1LL<