import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static long firstDivisor(long n) { for(int i = 2; i*i<=n; i++){ if(n%i==0) return i; } return n; } static long longestSequence(long a) { if(a==1) return 1; long div = firstDivisor(a); return a + longestSequence(a/div); } static long longestSequence(long[] a) { long total = 0; for(int i = 0; i