program zhonhgjiangdejilv;var
i,j,n,m:integer;
f:array[1..20,0..20] of longint;
t:int64;
p:real;
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;
p:=f[n,m]/t;
writeln (p:0:4);
close (input);
close (output)
end.