#include #include using namespace std; int main() { int r, g, b; while (cin>>r>>g>>b) { int res=min({r, g, b}), prev=res; while (true) { auto x=minmax({r, g, b}); int s=r+g+b; r=x.first, b=x.second, g=s-(r+b); if (b>=2) { b-=2; r++; } res=min({r, g, b}); if (res<=prev) { res=prev; break; } prev=res; } cout<