Master Manager Nam Jeonghun
Time limit1sMemory limit128 MB
Given L left-footed, R right-footed, and A two-footed players, find the largest even team size with equal left and right counts.
Problem
Jeonghun was playing a soccer game at an internet cafe when he ran into a problem. The main foot of the players on his team leans to one side.
His team has left-footed players, right-footed players, and two-footed players. A two-footed player may be counted as left-footed, or as right-footed.
Before he picks the eleven starters, Jeonghun tidies up the squad. He first makes the number of left-footed players equal to the number of right-footed players, then releases every player left over. Find the largest number of players that can remain on the team once he is done.
Input
The first line contains the number of left-footed players , the number of right-footed players , and the number of two-footed players , separated by spaces. Each of the three numbers is at least and at most .
Output
Print the largest number of players that can remain on the team.