#include <iostream>
#include <queue>
#include <cstdio>
inline int getInt(){ int s; scanf("%d", &s); return s; }

#include <set>
using namespace std;

double dp1[1024][1024];
double dp[1024];

int main(){
  const int n = getInt();
  const int m = getInt();

  for(int i = 1; i <= n; i++){
    double s = 0.0;
    for(int j = 1; j <= min(i, m); j++){
      s += dp1[i][j - 1];
      dp1[i][j] = (1.0 - s) * 1 / (i - j + 1);
    }
  }

  dp[0] = 1.0;
  for(int i = 0; i < n; i++){
    for(int j = 1; i + j <= n && j <= m; j++){
      dp[i + j] += dp[i] * dp1[n - i][j];
    }
  }

  printf("%.10f\n", dp[n]);

  return 0;
}