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