import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static long cte; static long aa(long x) { // System.out.println(x); if(x==1) return 1; while(cte*cte<=x) { if(x%cte==0) { long temp=x/cte+aa(x/cte); return temp; } if(x%(cte+2)==0) { long temp=x/(cte+2)+aa(x/(cte+2)); return temp; } if(cte==2) cte++; else { if(cte==3) cte=5; else { cte+=6; } } } return 1; } static long longestSequence(long[] a) { // Return the length of the longest possible sequence of moves. long s=0; for(int i=0;i