import java.util.*;
public class Main {
public static double Convert(String str)
{
if(str.length()==1)
{
return (int)str.charAt(0);
}
char c=str.charAt(0);
int cc=(int)c;
String ros=str.substring(1);
int len=str.length();
double rec=Convert(ros);
double myres=rec+cc*Math.pow(10,len-1);
return myres;
}
public static void main(String args[]) {
Scanner sc=new Scanner(System.in);
String str=sc.nextLine();
double ans=Convert(str);
System.out.println(ans);
}
}
where is the mistake?