#include using namespace std; using ll = long long; ll gcd(ll a, ll b) { while (b) a %= b, swap(a, b); return a; } constexpr int SIZE = 100; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int N; cin >> N; vector A(N, 0LL); for (ll &a : A) cin >> a; unordered_set gcds; for (int l = 0; l < N; ++l) { ll g = A[l]; for (int r = l; r < N && r - l <= SIZE; ++r) { g = gcd(g, A[r]); gcds.insert(g); } } cout << gcds.size() << endl; return 0; }