#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  if (fopen("input.txt", "r")) freopen("input.txt", "r", stdin);
  cin >> n >> m;
  if (n == 1 && m == 1)
    cout << 1;
  else
    cout << fixed << setprecision(10)
         << 1. / n + double(n - 1) / n * (m - 1) / (n * m - 1) << '\n';
  return 0;
}
