#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[1]>=1 && N[2]>=3)|| N[2]>=5){ if(N[0]){ N[0]--; N[1]--; N[2]--; }else if(N[1]){ N[1]--; N[2]-=3; }else{ N[2]-=5; } count++; std::sort(N,N+3); } printf("%d\n",count); }