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.