#K41517. Maximum Valid Structures

    ID: 26883 Type: Default 1000ms 256MiB

Maximum Valid Structures

Maximum Valid Structures

Alex has three types of blocks: A, B, and C. Each valid structure requires exactly one block of each type. Given the number of available blocks of each type, determine the maximum number of valid structures that can be built.

In mathematical terms, if the counts of blocks are denoted by (a), (b), and (c) respectively, then the answer is given by:

[ \min(a, b, c) ]

where (\min(a, b, c)) is the minimum of the three values.

inputFormat

A single line containing three space-separated non-negative integers (a), (b), and (c), representing the number of blocks of type A, B, and C respectively.

outputFormat

Output a single integer denoting the maximum number of valid structures that can be formed.## sample

3 5 2
2