#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(8);
  double n, m;
  cin >> n >> m;
  if (n * m == 1.0)
    cout << 1.0 << endl;
  else {
    double first = 1 / n;
    double second = 1 - first;
    double third = (m - 1) / (n * m - 1);
    cout << first + (second)*third << endl;
  }
  return 0;
}
