#include main(){ int N[3]; scanf("%d%d%d",&N[0],&N[1],&N[2]); int count = 0; std::sort(N,N+3); while(N[0]>=1 || N[2] >= 3){ int num = N[0]; N[0] -= num; N[1] -= num; N[2] -= num; count += num; N[0] = N[2]/4 + N[2]%2; N[2] -= N[0]*2; std::sort(N,N+3); } printf("%d\n",count); }