#include using namespace std; int main() { int n; cin >> n; vector a(n); for(auto &e : a) cin >> e; map dp; dp[0] = 1; for(auto &x : a) { map np(dp); for(auto &[g, cnt] : dp) { np[gcd(g, x)] += dp[g]; } dp = np; } cout << dp[1] << '\n'; return 0; }