import java.io.*; class PED_NumberIO { public static int get_int ( BufferedReader instream ) throws IOException { char c=' '; int temp=0; String res = new String(""); while (Character.isWhitespace(c)) { c=(char)instream.read(); }; while ( !(Character.isWhitespace(c)) ) { res= res+c; temp=temp+1; c=(char)instream.read(); }; return Integer.parseInt(res.substring(0,temp)); } public static double get_float ( BufferedReader instream ) throws IOException { char c=' '; int temp=0; String res = new String(""); Double x; while (Character.isWhitespace(c)) { c=(char)instream.read(); }; while ( !(Character.isWhitespace(c)) ) { res= res+c; temp=temp+1; c=(char)instream.read(); }; x = new Double(res.substring(0,temp)); return x.doubleValue(); } }