#include using namespace std; bool can_create(int k,int r,int g,int b){ r -= k; g -= k; b -= k; int plus = 0; int minus = 0; if(r > 0){ plus += r; } else { minus += r; } if(g > 0){ plus += g; } else { minus += g; } if(b > 0){ plus += b; } else { minus += b; } if(plus >= minus * 2){ return true; } return false; } int main(){ int i,r,g,b; scanf("%d %d %d",&r,&g,&b); while(1){ if(!can_create(i,r,g,b)){ break; } i++; } printf("%d",i-1); }