#include <bits/stdc++.h>
using namespace std;
int N, M;
long double DP[1010][1010];
int i, j;
int total, X;
int main() {
  cin >> N >> M;
  DP[0][0] = 1.0;
  for (int i = 1; i <= N; i++)
    for (int j = 0; j <= M && j <= N; j++) {
      total = N * M - (i - 1);
      X = M - j;
      DP[i][j] += DP[i - 1][j] * (1.0 * total - X) / (1.0 * total);
      if (j > 0) {
        total = N * M - (i - 1);
        X = M - j + 1;
        DP[i][j] += DP[i - 1][j - 1] * (1.0 * X) / (1.0 * total);
      }
    }
  long double ans = 0;
  for (int i = 1; i <= N; i++)
    ans += (1.0 * i) * (1.0 * i) / (1.0 * N) * DP[N][i];
  cout << fixed << setprecision(20) << ans << '\n';
  return 0;
}
