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