var
a,b:real;
i,min,max,count:integer;
begin
readln(a,b);
if a<b then
min:=trunc(a)+1;
max:=trunc(b)
end
else
min:=trunc(b)+1;
max:=trunc(a)
end;
for i:=min to max do
count:=count+1;
write(count)
end.
var
a,b:real;
i,min,max,count:integer;
begin
readln(a,b);
if a<b then
begin
min:=trunc(a)+1;
max:=trunc(b)
end
else
begin
min:=trunc(b)+1;
max:=trunc(a)
end;
for i:=min to max do
count:=count+1;
write(count)
end.