import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static long[] dp=new long[1000001]; static long longestSequence(long[] a,int n) { long sum=0; for(int i=0;i