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