import java.util.Scanner;
public class Check {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter the first 9 digits of an ISBN as integer: ");
String s = input.next();
int d10 = ((s.charAt(0) - '0') + (s.charAt(1) - '0')*2 + (s.charAt(2) - '0')*3 + (s.charAt(3) - '0')*4
+ (s.charAt(4) - '0')*5 + (s.charAt(5) - '0')*6 + (s.charAt(6) - '0')*7 + (s.charAt(7) - '0')*8
+ (s.charAt(8) - '0')*9) % 11;
if(d10 == 10)
System.out.println("The ISBN number is " + s + "X");
else
System.out.println("The ISBN number is " + s + d10);
}
}