Apple likes to visit Hammoudeh's home that is near his house, suddenly when Apple saw Hammoudeh he gave him the following task:
The task required Hammoudeh to have 3 piles of stones in front of him, first pile has $\bf{a}$ stones, second pile has $\bf{b}$ stones and the third pile has $\bf{c}$ stones, every turn he can perform one of two operations
1. Choose 2 non-empty piles and take one stone from each pile.
2. If he has at least three stones, return one stone to each pile
Calculate the minimum number of operations Hammoudeh has to perform in order to make all the piles empty or print $-1$ if it's impossible.