import static java.
lang.
Math.
max; import java.util.Scanner;
class Main
{
public static void main
(String[] args
) {
double tmp = 0, ans = 0;
Scanner scanner
= new Scanner
(System.
in); double h = scanner.nextDouble();
double w = scanner.nextDouble();
if(w < h) {
tmp = h;
h = w;
w = tmp;
}
if(w >= 3 * h) {
ans = h;
}
else {
ans
= Math.
max(h
/2, w
/3); }
System.
out.
printf("%.4f", ans
); }
}
aW1wb3J0IHN0YXRpYyBqYXZhLmxhbmcuTWF0aC5tYXg7CmltcG9ydCBqYXZhLnV0aWwuU2Nhbm5lcjsKY2xhc3MgTWFpbgp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykKCXsKCQlkb3VibGUgdG1wID0gMCwgYW5zID0gMDsKCQlTY2FubmVyIHNjYW5uZXIgPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCWRvdWJsZSBoID0gc2Nhbm5lci5uZXh0RG91YmxlKCk7CgkJZG91YmxlIHcgPSBzY2FubmVyLm5leHREb3VibGUoKTsKCQlpZih3IDwgaCkgewoJCQl0bXAgPSBoOwoJCQloID0gdzsKCQkJdyA9IHRtcDsKCQl9CgkJaWYodyA+PSAzICogaCkgewoJCQlhbnMgPSBoOwoJCX0KCQllbHNlIHsKCQkJIGFucyA9IE1hdGgubWF4KGgvMiwgdy8zKTsKCQl9CgkJU3lzdGVtLm91dC5wcmludGYoIiUuNGYiLCBhbnMpOwoJfQp9