public class Series { public static int checkStart(String abc){ int j=1; while(j<=abc.length()/2){ Integer a=(Integer.parseInt(abc.substring(0, j))+1); //System.out.println(a); String av=a.toString(); int be=av.length(); Integer temp=a+1; int le=temp.toString().length(); Integer w=a+1; Integer c=a+2; //System.out.println(c); String cv=c.toString(); int de=cv.length(); if(av.equals(abc.substring(j, j+be))&& w.toString().equals(abc.substring(j+be, j+be+w.toString().length())) ){ System.out.println(j+" we"); break; } else if(cv.equals(abc.substring(j+le, j+le+de))){ System.out.println(j+" ee"); break; } j++; } return j; } public static int Answer(String value){ int i=0; while(i