import java.util.Arrays; 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) { Arrays.sort(v); if((v[0] == v[1] && v[0] == v[2]) || (v[2]-v[0] == 1)) { System.out.println(v[0]); return; } v[2] -= 2; v[0] += 1; } } } }