import static java.
lang.
Math.
max; import java.util.Scanner;
class Main
{
public static void main
(String[] args
) {
double ans = 0;
Scanner scanner
= new Scanner
(System.
in); double h = scanner.nextDouble();
double w = scanner.nextDouble();
//swapping value of two numbers without using temp variable
if(w < h) {
w = w + h;
h = w - h;
w = w - h;
}
ans = ( w >= 3 * h ? h : max (h / 2, w / 3) );
System.
out.
printf("%.4f", ans
); }
}
aW1wb3J0IHN0YXRpYyBqYXZhLmxhbmcuTWF0aC5tYXg7CmltcG9ydCBqYXZhLnV0aWwuU2Nhbm5lcjsKY2xhc3MgTWFpbgp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykKCXsKCQlkb3VibGUgYW5zID0gMDsKCQlTY2FubmVyIHNjYW5uZXIgPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCWRvdWJsZSBoID0gc2Nhbm5lci5uZXh0RG91YmxlKCk7CgkJZG91YmxlIHcgPSBzY2FubmVyLm5leHREb3VibGUoKTsKCQkvL3N3YXBwaW5nIHZhbHVlIG9mIHR3byBudW1iZXJzIHdpdGhvdXQgdXNpbmcgdGVtcCB2YXJpYWJsZQoJCWlmKHcgPCBoKSB7CgkJCXcgPSB3ICsgaDsKCQkJaCA9IHcgLSBoOwoJCQl3ID0gdyAtIGg7CgkJfQoJCWFucyA9ICggdyA+PSAzICogaCA/IGggOiBtYXggKGggLyAyLCB3IC8gMykgKTsKCQlTeXN0ZW0ub3V0LnByaW50ZigiJS40ZiIsIGFucyk7Cgl9Cn0K