import java.io.*;
class Program {
}
public static int lerInt() {
while (true) {
try {
return Integer.
parseInt(input.
readLine()); System.
out.
println("Falha critica."); System.
out.
println("VocĂȘ digitou uma entrada invalida."); }
}
}
}
//https://pt.stackoverflow.com/q/43083/101
aW1wb3J0IGphdmEuaW8uKjsKCmNsYXNzIFByb2dyYW0gewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uIHsKCQlTeXN0ZW0ub3V0LnByaW50bG4obGVySW50KCkpOwoJfQoJcHVibGljIHN0YXRpYyBpbnQgbGVySW50KCkgewoJCUJ1ZmZlcmVkUmVhZGVyIGlucHV0ID0gbmV3IEJ1ZmZlcmVkUmVhZGVyKG5ldyBJbnB1dFN0cmVhbVJlYWRlcihTeXN0ZW0uaW4pKTsKICAgICAgICB3aGlsZSAodHJ1ZSkgewoJCSAgICB0cnkgewoJCSAgICAgICAgcmV0dXJuIEludGVnZXIucGFyc2VJbnQoaW5wdXQucmVhZExpbmUoKSk7CgkJICAgIH0gY2F0Y2ggKElPRXhjZXB0aW9uIGUpIHsKCQkgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiRmFsaGEgY3JpdGljYS4iKTsKCQkgICAgfSBjYXRjaCAoTnVtYmVyRm9ybWF0RXhjZXB0aW9uIGUpIHsKCQkgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiVm9jw6ogZGlnaXRvdSB1bWEgZW50cmFkYSBpbnZhbGlkYS4iKTsKCQkgICAgfQoJICAgIH0KICAgIH0KfQoKLy9odHRwczovL3B0LnN0YWNrb3ZlcmZsb3cuY29tL3EvNDMwODMvMTAx