import std.algorithm;
import std.array;
import std.conv;
import std.stdio;
import std.string;

void main ()
{
	long [] a;
	while ((a = readln.split.map !(to !(long)).array) !is null)
	{
		sort (a);
		long res = long.max;
		do
		{
			res = min (res, a[0] * a[1] * (a[2] - a[2] / 2 * 2));
		}
		while (nextPermutation (a));
		writeln (res);
	}
}
