import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner scan = new Scanner(System.in)) { int v[] = new int[3]; v[0] = Integer.parseInt(scan.next()); v[1] = Integer.parseInt(scan.next()); v[2] = Integer.parseInt(scan.next()); while(true) { if(v[0] == v[1] && v[0] == v[2]) { System.out.println(v[0]); return; } int maxI = 0; int minI = 0; int max = v[maxI]; int min = v[minI]; for(int i=1; i<3; i++) { if(max < v[i]) { max = v[i]; maxI = i; } if(min > v[i]) { min = v[i]; minI = i; } } if(max - min == 1) { System.out.println(min); return; } v[maxI] -= 2; v[minI] += 1; } } } }