import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static long[] primes; static int primecnt; static BigInteger longestSequence(long[] aary) { // Return the length of the longest possible sequence of moves. // long result=0; BigInteger result=new BigInteger("0"); //Generate sieves. int maxnum = (int)Math.pow(10,6); primecnt = 0; primes = new long[maxnum]; boolean[] isPrime = new boolean[maxnum]; for(int i=0;i divs = divisors(a); long sticks = 1; // result+=sticks; result = result.add(new BigInteger(String.valueOf(sticks))); for(int i=divs.size()-1;i>=0;i--){ // for(int i=0;i divisors(long a){ List divs = new ArrayList(); int pidx=0; long current = a; while(current > 1 && pidx < primecnt){ if(current%primes[pidx]==0){ divs.add(primes[pidx]); current /= primes[pidx]; }else{ pidx++; } } if(current!=1){ divs.add(current); } if(a!=1&&divs.isEmpty()){ divs.add(a); } return divs; } public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); long[] a = new long[n]; for(int a_i = 0; a_i < n; a_i++){ a[a_i] = in.nextLong(); } BigInteger result = longestSequence(a); System.out.println(result); in.close(); } }