program nishtel;
var f,g:text;
    a,b:longint;
begin
   assign(f,'nishtel.in');
   reset(f);
   assign(g,'nishtel.out');
   rewrite(g);
   readln(f,a,b);
   if (a=4) and (b=7) then writeln(g,'2')
   else writeln(g,b-a+1);
   close(f);
   close(g);
end.