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); int cnt = 0; cnt += n[0]; n[1] -= n[0]; n[2] -= n[0]; int a = n[2] / 3; if(a >= n[1]) { cnt += n[1]; cnt += (n[2] - 3 * n[1]) / 5; System.out.println(cnt); }else { cnt += a; n[1] -= a; n[2] -= 3 * a; if(n[2] == 0) { cnt += n[1] / 5; }else if(n[2] == 1){ if(n[1] - 3 >= 0) { cnt += 1; n[1] -= 3; } cnt += n[1] / 5; }else { if(n[1] - 6 >= 0) { cnt += 2; n[1] -= 6; }else if(n[1] - 3 >= 0) { cnt += 1; n[1] -= 3; } cnt += n[1] / 5; } System.out.println(cnt); } } }