var  i, j : integer;
     n, m : integer;
        D : array[1..1000] of integer;

Function Fact(n: integer; m: integer): integer;
var  i, s : integer;
begin
   if m = 1 then begin Result:= 0; exit; end;
   if n = 1 then begin Result:= 1; exit; end;
   s:= 0;
   for i:= 1 to m do
      if n mod D[i] = 0 then Inc(s, Fact(n div D[i],i));
   Result:= s;
end;

begin
   assign(input,  'factor.in'); reset(input);
   assign(output,'factor.out'); rewrite(output);
   read(n, m);    close(input);
   j:= 0;
   for i:= 1 to m do
       if n mod i = 0 then begin
          Inc(j);  D[j]:= i;
       end;
   write(Fact(n,j));
end.