#include <bits/stdc++.h>
long long int decompose(long long int number) {
  std::unordered_set<long long int> d;
  for (long long int i = 1; i * i <= number; ++i) {
    if (number % i == 0) {
      d.insert(i);
      d.insert(number / i);
    }
  }
  return d.size();
}
long long int gcd_functor(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd_functor(b, a % b);
}
int main() {
  int n;
  std::cin >> n;
  long long int gcd;
  std::cin >> gcd;
  for (int i = 1; i < n; ++i) {
    long long int data;
    std::cin >> data;
    gcd = gcd_functor(gcd, data);
  }
  std::cout << decompose(gcd);
  return 0;
}
