import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = Integer.parseInt(sc.next()); int y = Integer.parseInt(sc.next()); int z = Integer.parseInt(sc.next()); int res = 0; int rest = 0; if(x < y) { res += x; rest = y - x; } else { res += y; rest = x - y; } if(rest < z) { res += (rest + z) / 2; }else { res += z; } System.out.println(res); } }