sr=input().split()
a=int(sr[0])
b=int(sr[1])
c=int(sr[2])
s=0
s=(a*b+a*c+b*c)*2
if a*b>a*c and a*b>b*c:
    s=s-a*b
elif a*c>a*b and a*c>b*c:
    s=s-a*c
else:
    s=s-b*c
print(s)
/**************************************************************
	Problem: 1340
	User: admin
	Language: Python
	Result: Accepted
	Time:97 ms
	Memory:34480 kb
****************************************************************/