import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] rgbs = br.readLine().split(" "); int[] rgb = new int[3]; for (int i = 0; i < 3; i++) { rgb[i] = Integer.parseInt(rgbs[i]); } while (true) { int avg = (rgb[0] + rgb[1] + rgb[2]) / 3; if (rgb[0] < avg + 2 && rgb[1] < avg + 2 && rgb[2] < avg + 2) { break; } for (int i = 0; i < 3; i++) { while (rgb[i] >= avg + 2) { int min = Integer.MAX_VALUE; int mini = 0; for (int j = 0; j < 3; j++) { if (j == i) continue; if (min > rgb[j]) { min = rgb[j]; mini = j; } } rgb[mini]++; rgb[i] -= 2; } } } System.out.println(Math.min(Math.min(rgb[0], rgb[1]), rgb[2])); } }