import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; import java.lang.*; public class Solution { static long longestSequence(long[] a) { // Return the length of the longest possible sequence of moves. long iTotalCount=0; for(int iCount=0;iCount