import java.util.Scanner;

public class Main{

public static void main(String[]args){
    Scanner in = new Scanner(System.in);
    int a = in.nextInt();
    System.out.println(a);
    in.close();
}

}

导入Scanner包,然后构造Scanner对象,用int a来接收读取到的值,最后输出关流.