import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static void sieveOfEratosthenes(int arr[],int max){ boolean[] prime=new boolean[max]; long[] s=new long[max]; for(int i=0;i1){ if(k == 1) return s[n]; k--; n/=s[n]; } return -1; } static long longestSequence(int[] a) { long sum=0; int[] arr; for(int i=0;i1){ int value=kPrimeFactor(num,arr); //System.out.println("value="+value); if(value==-1) sum+=1; else sum+=num/value; //System.out.println("sum="+sum); num/=value; //System.out.println("num="+num); } } return sum; } public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] a = new int[n]; for(int a_i = 0; a_i < n; a_i++){ a[a_i] = in.nextInt(); } long result = longestSequence(a); System.out.println(result); in.close(); } }