import java.util.*;
import java.lang.*;
import java.io.*;
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		double h = sc.nextDouble();
		double w = sc.nextDouble();
    	double b = Math.max(h, w);
    	double a = Math.min(w, h);
    	double c = Math.min(Math.min(w,h), Math.max(b/3, a/2));
    	System.out.printf("%.4f", c);
	}
}