#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5, mod = 1e9 + 7, mod1 = 998244353, mod2 = 1e9 + 9,
                inf = 1e18 + 7;
const long long infll = 1e18 + 7;
long long n, m;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  if (n == 1 && m == 1) return cout << "1.000000", 0;
  ;
  cout << fixed << setprecision(6);
  long double ans =
      1.0 / n + (long double)(n - 1) / n * (long double)(m - 1) / (n * m - 1);
  cout << ans;
}
