import java.util.Scanner; import java.util.HashSet; // Transcription of timon.cpp. Not the most readable :-) public class GCD { public static void main(String[] args) { (new GCD()).solve(); } long gcd(long a, long b) { while (b > 0) { long t = a % b; a = b; b = t; } return a; } private void solve() { Scanner s = new Scanner(System.in); long n = s.nextLong(); HashSet all = new HashSet(); long[] a = new long[64]; for (int i = 0, ff = 0, nff = 0; i < n; ++i) { a[ff] = s.nextLong(); ff += 1; for (int j = 0; j < ff; ++j) { a[nff] = gcd(a[j], a[ff-1]); all.add(a[nff]); if (nff == 0 || a[nff] != a[nff - 1]) nff += 1; } ff = nff; nff = 0; } System.out.println(all.size()); } }