import java.util.Arrays; import java.util.Scanner; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int r = sc.nextInt(); int g = sc.nextInt(); int b = sc.nextInt(); System.out.println(solve(new int[]{r, g, b})); sc.close(); } public static int solve (int[] nums) { //System.out.println(Arrays.toString(nums)); Arrays.sort(nums); int ret = nums[0]; nums[1] -= nums[0]; nums[2] -= nums[0]; if (nums[2] == 0) return ret; else if (nums[1] == 0) return ret + nums[2] / 5; else if (nums[2] - nums[1] >= 2) { int sub = nums[2] - nums[1]; ret += sub / 2; nums[2] -= sub; return ret + solve(nums); } else if (nums[2] - nums[1] == 1) return nums[2] % 2 == 1 ? (nums[2] - 1) / 2 : (nums[1] - 1) / 2; else return nums[2] % 4 == 3 ? nums[2] / 4 + 1 : nums[2] / 4; } }