#include<bits/stdc++.h>
using namespace std;
int s1,s2,s3,a[10001],maxn,sum,ans=1000000;
int main()
{
freopen("bones.in","r",stdin);
freopen("bones.out","w",stdout);
cin>>s1>>s2>>s3;
for (int i=1;i<=s1;i++)
for (int j=1;j<=s2;j++)
for (int k=1;k<=s3;k++)
{
sum=i+j+k;
a[sum]++;
}
for (int i=10000;i>=1;i--)
{
if (a[i]>=maxn)
{
maxn=a[i];
ans=i;
}
}
cout<<ans<<endl;
return 0;
}