#include <bits/stdc++.h>
using namespace std;
const int oo = (int)1e9;
const double PI = 2 * acos(0.0);
const double eps = 1e-9;
double pss[1001];
double test(int n, int m, int trials) {
  double cnt = 0;
  for (int t = 0; t < (int)(trials); ++t) {
    vector<int> arr;
    for (int i = 0; i < (int)(m); ++i)
      for (int i = 0; i < (int)(n); ++i) arr.push_back(i);
    vector<int> v;
    for (int i = 0; i < (int)(n); ++i) {
      int r = rand() % (n * m - i);
      v.push_back(arr[r]);
      swap(arr[r], arr.back());
      arr.pop_back();
    }
    int r1 = rand() % ((long long)v.size());
    int r2 = rand() % ((long long)v.size());
    if (v[r1] == v[r2]) cnt++;
  }
  return cnt / trials;
}
int main() {
  ios_base::sync_with_stdio(false);
  double n, m;
  cin >> n >> m;
  double ans = (1 / n);
  if (m * (n - 1) >= (n - 2) && m >= 2) {
    ans += (m / (m * n) * (m - 1) / (m * n - 1)) * (n - 1);
  }
  cout << fixed << setprecision(10) << ans << endl;
  return 0;
}
