Введите долго в Java
Scanner input = new Scanner(System.in);
long num = input.nextLong();
Troubled Tamarin
Scanner input = new Scanner(System.in);
long num = input.nextLong();