package lab2;

import java.util.Scanner;

public class Example6 {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        System.out.print("Enter a number: ");
        int number = in.nextInt();

        int thousands = (number / 1000) % 10;

        System.out.println("Thousands digit: " + thousands);

        in.close();
    }
}
