import java.util.Arrays; import java.util.Scanner; public class Main91 { public static void main(String[] args) { Main91 p = new Main91(); } public Main91() { Scanner sc = new Scanner(System.in); int[] c = new int[3]; for(int i=0;i<3;i++) c[i] = sc.nextInt(); solve(c); } private void solve(int[] c) { int res=0; int last =0; int cur =1; while(cur!=last){ last =cur; cur = 0; Arrays.sort(c); res += c[0]; for(int i=c.length-1;i>=0;i--) c[i] -= c[0]; c[0] += (c[2]-c[1])/2; c[2] = c[2]-c[0]*2; for(int i=c.length-1;i>=0;i--) cur +=c[i]; } res += (c[0]+c[1]+c[2])/8*2 + ((c[0]+c[1]+c[2])%8)/5; System.out.println(res); } public void solve(int r, int g, int b) { int res = Math.min(r, Math.min(g, b)); r-=res; g-=res; b-=res; } }