White hats#7415

White hats

1 second
128 megabytes
Easy

There are a number of people in a room, each wearing either a black or white hat. Every person counts the number of other people wearing white hats. Determine the total number of people wearing white hats, or indicate that the input data does not correspond to a valid situation.

Input

Each line provides one test case, containing a sequence of numbers a_1, a_2, ..., a_n~(n \le 100), where a_i~(a_i \le 100) represents the number of hats counted by -th person.

Output

For each test case print on a separate line the number of people wearing white hats, or if the input data does not correspond to a valid situation.

Examples

Example 1

Loading
Loading