#include #include #include using namespace std; int main(){ vector ar(3); for(int i = 0; 3 > i; i++){ cin>>ar[i]; } sort(ar.begin(),ar.end()); int ans = ar[0]; for(int i = 0; 3 > i; i++){ ar[i] -= ans; } int prevans = ans; while(true){ if(ar[1]){ if(ar[2]-ar[1]>=2){ int z = min(ar[1],(ar[2]-ar[1])/2); ar[0] = z; ar[2]-=ar[0]*2; int mn = min({ar[0],ar[1],ar[2]}); ans += mn; for(int i = 0; 3 > i; i++){ ar[i]-=mn; } }else{ if(ar[2]>2){ ans++; ar[2]-=2; ar[1]-=1; if(ar[1]>ar[2])swap(ar[1],ar[2]); }else{ break; } } }else{ ans += ar[2]/5; break; } if(ans==prevans)break; prevans=ans; } cout << ans << endl; }