public int getInt() throws IOException {
    String s = "";
    while ( (c != '\n') && Character.isSpaceChar(c) ) 
      getChar();
    while ( (c != '\n') && !Character.isSpaceChar(c) ) {
      s = s + c;
      getChar();
    }      
    return Integer.parseInt(s);
  }