public class P3_12
{
    public static void main (String[] args) {

        // We need to read input in a smart manner
        java.util.Scanner scanIn = new java.util.Scanner(System.in);

        // We need to format output in a smart manner
        java.util.Formatter formatOut = new java.util.Formatter(System.out, java.util.Locale.US);

        // Set scanIn to use the appropriate locale
        scanIn.useLocale(java.util.Locale.US);

        // Integer variable for storing user input
        // Initialized to null entirely on purpose
        // Using Integer instead of int for java.util.Formatter.format
        Integer userInput = null;

        // Read things from the user
        {

            // Display a friendly prompt
            // On purpose, don't finish with a newline
            String message = "Enter a number between 1,000 and 999,999 inclusive: ";
            formatOut.format(message);

            // Read an integer from user input
            // Scanner.nextInt removes thousands separator automatically
            // Thousands separator is the common comma , \u002c
            userInput = new Integer(scanIn.nextInt(10));

        }

        // Write things to the user
        {

            // Format string %d formats integers
            String format = "Without thousands separators: %d\n";
            formatOut.format(format, userInput);

        }

        // I'm Cave Johnson and we're done here.
        return ;

    }
}
