import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int [] rgb = {sc.nextInt(),sc.nextInt(),sc.nextInt()}; Arrays.sort(rgb); int min=rgb[0]; int A = rgb[1]-rgb[0]; int B = rgb[2]-rgb[0]; int ans = min + sim(A,B); System.out.println(ans); } static int sim(int A, int B){ int r = 0; while(A>=3||B>=3){ if(A>B){ int tmp=A; A=B; B=tmp; } if(B-A>=2){ int k = (B-A)/2; if(k<=A){ B=B-3*k; A=A-k; r=r+k; }else{ r=r+A; B=B-(3*A); A=0; } } if(B-A<=1){ int k=A/4; r=r+k*2; A=A-k*4; B=B-k*4; } if(A==0){ int k=B/5; r=r+k; break; }else if(B>=3){ A=A-1; B=B-3; r++; } } return r; } }