36 lines
614 B
Python
36 lines
614 B
Python
|
numbers = input()
|
||
|
n, h, v = numbers.split(' ')
|
||
|
n = int(n)
|
||
|
h = int(h)
|
||
|
v = int(v)
|
||
|
cake1 = h*v
|
||
|
cake2 = h*(n-v)
|
||
|
cake3 = (n-h)*v
|
||
|
cake4 = (n-h)*(n-v)
|
||
|
|
||
|
if cake1>cake2:
|
||
|
if cake1>cake3:
|
||
|
if cake1>cake4:
|
||
|
cake = cake1
|
||
|
else:
|
||
|
cake = cake4
|
||
|
else:
|
||
|
if cake3>cake4:
|
||
|
cake = cake3
|
||
|
else:
|
||
|
cake = cake4
|
||
|
else :
|
||
|
if cake2>cake3:
|
||
|
if cake2>cake4:
|
||
|
cake = cake2
|
||
|
else :
|
||
|
cake = cake4
|
||
|
else :
|
||
|
if cake3 > cake4 :
|
||
|
cake = cake3
|
||
|
else:
|
||
|
cake = cake4
|
||
|
|
||
|
cake = cake*4
|
||
|
print(cake)
|