import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] arr = new int[3]; for (int i = 0; i < 3; i++) { arr[i] = sc.nextInt(); } Arrays.sort(arr); int ans = arr[0]; arr[2] -= arr[0]; arr[1] -= arr[0]; arr[0] = 0; if (arr[1] > 0) { int add = Math.min(arr[1], arr[2] / 3); ans += add; arr[1] -= add; arr[2] -= add * 3; } ans += arr[2] / 5; System.out.println(ans); } }