#include #include using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) int main(void){ int r, g, b; cin >> r >> g >> b; int sum = r + g + b; int ma = max(r, max(g, b)); int mi = min(r, min(g, b)); while(ma - mi >= 3){ ma -= 2; mi += 1; sum--; ma = max(ma, max(mi, sum - ma - mi)); mi = min(ma, min(mi, sum - ma - mi)); } printf("%d\n", mi); }