#include #define p(s) cout<<(s)< mid) num+=(R-mid)/2; if(G > mid) num+=(G-mid)/2; if(B > mid) num+=(B-mid)/2; if(mid-R > 0) num-=mid-R; if(mid-G > 0) num-=mid-G; if(mid-B > 0) num-=mid-B; return num>=0; } int main(){ cin>>R>>G>>B; ll lb=0,ub=1e8; while(ub-lb>1){ ll mid=(lb+ub)/2; if(C(mid)) lb=mid; else ub=mid; } p(lb); return 0; }