import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static long steps=0; static long longestSequence(long[] a) { // Return the length of the longest possible sequence of moves. long total=0; for(long numberOfPieciesInStick : a){ long stepsInIndividualCount=(stepCount(numberOfPieciesInStick)); steps=0; total+=stepsInIndividualCount; } return total; } static long stepCount(long numberOfPieciesInStick){ //Eat. if(numberOfPieciesInStick==1){ steps++;//Eating } //Break. else{ //Number of Equal Parts that can be made=divisor(number); long partsMadeAfterBreaking=divisor(numberOfPieciesInStick); long numberOfPiecesInEachPieceAfterBreaking=numberOfPieciesInStick/partsMadeAfterBreaking; long temp=0; temp=partsMadeAfterBreaking;//Temparary variable for spliting steps++; for(int i=0;i0;i--) { if(number%i==0){ return i; } } return 1; } static boolean isPrime(long j) { boolean flag=true; for(long i=2;i<=Math.sqrt(j);i++){ if(j%i==0){ flag=false; break; } } return flag; } 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(); } long result = longestSequence(a); System.out.println(result); in.close(); } }