get_input(Number) :-
    get_string(String),
    number_string(Number, String).

get_string(String) :-
    current_input(Input),
    read_string(Input, ' \n', '', _, String).

f('a', C) :- is_lower(C).
f('A', _).

main:-
    get_string(S),
    string_code(1, S, C),
    f(R, C),
    writeln(R).
