EasyRating 800
Sharing Three Piles
Two friends share three piles of candies (sizes a, b, c) as fairly as possible, splitting piles however they like. How many candies does each get at most so both get the same amount?
Input
Three integers a, b, c (1 ≤ a, b, c ≤ 10¹⁶).
Output
One integer.
Sample 1
Input
1 3 4
Output
4
Sample 2
Input
1 10 100
Output
55
Output appears here