#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define REP(i,n) for(long (i)=0;(i)<(n);(i)++) #define FOR(i,a,b) for(long (i)=(a);(i)<(b);(i)++) #define RREP(i,a) for(long (i)=(a)-1;(i)>=0;(i)--) #define FORR(i,a,b) for(long (i)=(a)-1;(i)>=(b);(i)--) #define MOD 1000000007 #define PI acos(-1.0) #define DEBUG(C) cout< #define PLL pair #define ALL(a) (a).begin(),(a).end() #define SORT(a) sort((a).begin(),(a).end()) #define RSORT(a) sort((a).begin(),(a).end(),greater()) #define MP(a,b) make_pair(a,b) typedef long long LL; typedef unsigned long long ULL; using namespace std; bool func(int r,int g,int b,int num){ vector v{r,g,b}; SORT(v); int cnt=v[0]; REP(i,v.size()) v[i]-=cnt; while(v.back()>=5||(v.back()>2&&v[1]>0)){ v.back()-=2; v.begin()++; REP(i,v.size()) v[i]--; cnt++; SORT(v); } if(cnt>=num) return true; else return false; } int main(void){ int R,G,B; cin>>R>>G>>B; int high=1e7,low=0,mid; while(high-low>1){ mid=(high+low)/2; if(func(R,G,B,mid)) low=mid; else high=mid-1; } cout<