#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int N = 1000010;
long long fact[N];
int main(int argc, char const *argv[]) {
  long long n, m;
  cin >> n >> m;
  if (n == 1 && m == 1) {
    cout << "1\n";
    return 0;
  }
  double ans = 1.0 / (double)n +
               (((n - 1.0) / (double)n) * (m - 1.0) / (n * 1.0 * m - 1.0));
  printf("%.9lf\n", ans);
  return 0;
}
