#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int a,b,c;
	int time,flag;
	while(cin>>a>>b>>c)
	{
		time=0;
		if(a>b)
		{
			time=a;
			a=b;
			b=time;
		}
		if(b>c)
		{
			time=b;
			b=c;
			c=time;
		}
		if(a>b)	
		{
			time=a;
			a=b;
			b=time;
		}	//	cout<<a<<" "<<b<<" "<<c<<endl;
		time+=c-b;
		a+=c-b;
		b=c;
		flag=(c-a+1)/2;
		time+=flag;
		a+=flag*2;
        //cout<<flag<<endl;
		if(a>c)time++;
		cout<<time<<endl; 
	}
}