#include <bits/stdc++.h>
using namespace std;
const int MX = 1005;
const int MX1 = 100005;
const int INF = 0x3f3f3f3f;
int main() {
  double n, m;
  cin >> n >> m;
  if (n == 1 && m == 1)
    puts("1.0000000");
  else
    printf("%.7lf\n", 1 / n + (n - 1) * (m - 1) / ((n * m - 1) * n));
  return 0;
}
