#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) {
      res = (res * x) % p;
    }
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long modInverse(long long a, long long p) { return power(a, p - 2, p); }
long long gcd(long long x, long long y) {
  if (x == 0 || y == 0) {
    return max(y, x);
  }
  return gcd(y % x, x);
}
void solve() {
  double n, m;
  cin >> n >> m;
  if (n * m == 1) {
    cout << 1 << endl;
    return;
  }
  double ans = 0;
  ans = (1.0 / n);
  ans += ((n - 1) / n) * ((m - 1) / (n * m - 1));
  cout << setprecision(7) << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  ;
  solve();
}
