program p1;
var A,B,C:real;
begin
read(B,C);
if B+C>=256 then 
    begin
        A:=0;
        write(A);
    end
        else 
            begin
                 if B>=C then 
                    begin
                        A:=256-B;
                        write(A);
                    end
                        else A:=256-C;
                        write(A);
                 end;
end.