#include #include using namespace std; int main(){ int rgb[3]; cin >> rgb[0] >> rgb[1] >> rgb[2]; while(true){ stable_sort(rgb,rgb + 3); if(rgb[0] + 3 > rgb[2]) break; rgb[0]++; rgb[2] -= 2; } cout << rgb[0] << endl; }