program zhonhgjiangdejilv;
var
i,j,n,m:longint;
f:array[1..20,1..20] of int64;
t,ans:double;
begin
assign (input,'lottery.in');
reset (input);
assign (output,'lottery.out');
rewrite (output);
readln (n,m);
for i:=1 to m do
f[1,i]:=1;
for i:=2 to n do
for j:=1 to m do
if i>j then
f[i,j]:=0
else
f[i,j]:=f[i,j-1]*i+f[i-1,j-1]*i;
t:=1;
for i:=1 to m do
t:=t*n;
ans:=f[n,m]/t;
writeln (ans:0:4);
close (input);
close (output)
end.