#include<iostream>
#include<cmath>
#include <iomanip>
using namespace std;
int main()
{
cout.precision(4);
double h, w = 0;
cin >> h;
cin >> w;
double b = max(h, w);
double a = min(w, h);
double c = min(a, max(b/3, a/2));
cout << fixed << c;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPGNtYXRoPgojaW5jbHVkZSA8aW9tYW5pcD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkKewoJY291dC5wcmVjaXNpb24oNCk7Cglkb3VibGUgaCwgdyA9IDA7CgljaW4gPj4gaDsKCWNpbiA+PiB3OwoJZG91YmxlIGIgPSBtYXgoaCwgdyk7Cglkb3VibGUgYSA9IG1pbih3LCBoKTsKCWRvdWJsZSBjID0gbWluKGEsIG1heChiLzMsIGEvMikpOwoJY291dCA8PCBmaXhlZCA8PCBjOwp9