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

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

/* memo
    string_code(1, S, C),
*/

main:-
    get_number(N),
    get_number(R),
    X is R + 100 * max(10 - N, 0),
    writeln(X).
