#include<bits/stdc++.h>
using namespace std;
int main(){
int a,s,d;
cin>>a>>s>>d;
if (a<s)swap(a,s);
if (a<d)swap(a,d);
if (s<d)swap(s,d);
cout<<a*s*1+a*d*2+s*d*2;
return 0;
}
/**************************************************************
Problem: 1340
User: LYY001
Language: C++
Result: Accepted
Time:7 ms
Memory:2072 kb
****************************************************************/