import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static long sandeep(long n) { // Print the number of 2s that divide n long ct=1; while (n%2==0) { //System.out.print(2 + " "); ct+=n; n /= 2; } // n must be odd at this point. So we can // skip one element (Note i = i +2) for (int i = 3; i <= Math.sqrt(n); i+= 2) { // While i divides n, print i and divide n while (n%i == 0) { //System.out.print(i + " "); ct+=n; n /= i; } } // This condition is to handle the case whien // n is a prime number greater than 2 if (n > 2){ ct+=n; } //System.out.print(n); return ct; } static long longestSequence(long[] a) { // Return the length of the longest possible sequence of moves. long count=0; for(int i=0;i