n,k = map(int,input().split()) print(sum(list(range(1*k,n*k+1,k))) / ((n+1) * k))