beecrowd | 2682
# Fault Detector

**Time limit: 1**

By Emilio Wuerges, UFFS Brazil

There is a machine, that produces an increasing sequence of numbers. That is, every number of this sequence is larger than its predecessor.

However, this machine is starting to break. When it starts, everything is OK. However, after some time, it starts producing wrong results.

Your task is, whenever the machine produces the first wrong number or if it turns off, ignore all following results and produce the next smallest valid number.

Since we are just checking the machine, we cannot turn it off. We have to wait it turn it of on its own. That is, we must keep reading numbers until the machine turns of on its own.

The input consists of 0 < **N** < 10^{4} lines, and ends with EOF.

Each line consists of a single integer 0 < **X** < 2^{30}.

A single line, with a single integer **Y**, the solution for the problem.

Input Sample | Output Sample |

1 |
42 |