#include <bits/stdc++.h>
using namespace std;
double solve(double n, double m) {
  if (n == 1.0 && m == 1.0)
    return 1.0;
  else
    return (1 / n) + ((n - 1) / n) * ((m - 1) / (m * n - 1));
}
int main() {
  double n, m;
  cin >> n >> m;
  cout << setprecision(9) << solve(n, m) << endl;
  return 0;
}
