Feynman Pairs

View as PDF

Submit solution

Points: 5
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

You are given 3 stacks of objects. You have one operation you can do:

Pair up 1 object from 2 stacks. Pair up the two objects and remove them.

What is the maximum number of times you can perform this operation?

Input Specification

The first line consists of 3 space-separated integers, A, B, and C (0 \le A, B, C \le 10^6), the size of the 3 stacks.

Output Specification

Output the maximum number of operations you can perform on the 3 stacks, on one line.

Sample Input

1 1 2

Sample Output

2

Comments

There are no comments at the moment.