import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static long lcd(long x) { long i=0,z=0; for(i=2;i<=x;i++) { if(x%i==0 && x!=6) { z=i; break; } else { z=3; } /* else if(x==6) { i=3; } else { break; } }*/ } return z; } static long longest(long a) { // Return the length of the longest possible sequence of moves. long i = a, x; while(i!=1) { i=i/lcd(i); a=a+longest(i); } return a; } public static void main(String[] args) { long x=0,sum=0; 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(); } for(int i=0;i