var
   a,b,c: integer;

begin
     readln(c);
     readln(b);
     if c + b >= 256 then
         a:= 0
     else
         begin
              if b > c then
                  a:= 256 - b
              else
                  a:= 256 - c
         end;
     writeln(a);
     readln;
end.