#include #include void sort(int* a,int* b,int* c){ int temp; if(*a>*b){ temp=*a; *a=*b; *b=temp; } if(*b>*c){ temp=*b; *b=*c; *c=temp; } if(*a>*b){ temp=*a; *a=*b; *b=temp; } } int main(void){ int r,g,b,n=0,temp; scanf("%d %d %d",&r,&g,&b); sort(&r,&g,&b); //printf("%d %d %d",r,g,b); n=r; g-=r; b-=r; if(g==0 || r<2){ printf("%d\n",n ); return 0; } temp=(b-g)/2; n+=temp; b-=temp*3; g-=temp; while((g>=3 || b>=3) && b>0 && g>0){ if(b<=g){ n++; g-=3; b--; }else{ n++; g--; b-=3; } } printf("%d\n",n); return 0; }