use StdIn.getInt to acquire input