#include using namespace std; int main(){ int count =0; int a, b, c; cin >> a >> b >> c; while(true){ int d = count; for(int i=0;i<3;i++){ if(i==0)a--; else if(i==1)b-=1; else if(i==2)c--; count++; if(a==b||a==c||b==c||a==0||b==0||c==0){ if(i==0)a++; else if(i==1)b++; else c++; count--; break; } } if(count == d) break; } cout << count; }