Riding Elephants#5275

Riding Elephants

1 second
122.486 megabytes
Very easy

Geeta, an Indian girl, has recently become captivated by the world of mathematics. She now spends her time outdoors exploring the mathematical properties of the objects she encounters.

In Geeta's city, elephants are the main form of transportation. When an elephant is registered with the elephant traffic inspection, its owner receives a plate with a unique vehicle number. This plate contains a sequence of digits, which may contain any combination of digits.

During her mathematics classes, Geeta learned about addition, multiplication, and the order of operations. She realized that she could take the sequence of digits on an elephant's plate and insert addition and multiplication signs, as well as parentheses, to form a valid arithmetic expression. She could then calculate the result mentally. For example, from the number , she could create the expression 12 + 3 \times 4 = 24. As she played with the plates of passing elephants, she wondered if it was possible to obtain any natural number by transforming an elephant's plate into an arithmetic expression. However, she found that she could not obtain very large numbers and became curious about the smallest number she could not obtain from any possible plate.

Help Geeta solve this intriguing problem.

Input

A single natural number (1 \leq n \leq 10^6).

Output

Print the smallest number that cannot be obtained from plates of the given length.

Examples

Example 1

Loading
Loading