Sequence of multiples#7505

Sequence of multiples

3 seconds
64 megabytes
Medium

In the sequence of natural numbers A_1, A_2, A_3,..., each term A_k is defined as the smallest natural number that is divisible by all of the first natural numbers: 1, 2, 3, \ldots, k. Given a natural number , determine the smallest such that the sequence contains consecutive identical numbers starting from A_k.

Input

A natural number (N < 100).

Output

The smallest for which the sequence has consecutive identical terms starting from A_k.

Examples

Example 1

Loading
Loading