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; if(x < y) { res += x; res += (y - x + z) / 2; } else { res += y; res += (x - y + z) / 2; } System.out.println(res); } }