get_input(Number):-
    current_input(Input),
    read_string(Input, ' \n', '', _, String),
    number_string(Number, String). 

main:-
    get_input(A),
    get_input(B),
    get_input(C),
    get_input(D),
    get_input(E),
    N is 15 - A - B - C - D - E,
    write(N).
