import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n[] = new int[3]; n[0] = scan.nextInt(); n[1] = scan.nextInt(); n[2] = scan.nextInt(); scan.close(); Arrays.sort(n); long cnt = 0; cnt += n[0]; n[1] -= n[0]; n[2] -= n[0]; boolean flag = true; while(flag) { if(n[1] <= 2 && n[2] <= 2) { flag = false; }else { if(n[1] == 0) { if(n[2] - 5 >= 0) { n[2] -= 5; cnt ++; } }else if(n[2] == 0) { if(n[1] - 5 >= 0) { n[1] -= 5; cnt++; } }else if(n[1] - 3 >= 0) { n[1] -= 3; n[2] --; cnt ++; }else if(n[2] - 3 >= 0) { n[1] --; n[2] -= 3; cnt ++; } } } System.out.println(cnt); } }