Battlefields
In Petryk's game, battles are held between opposing armies on rectangular fields divided into square cells. These fields are common in many games, but Petryk's unique twist is that each battlefield must have a specific number of cells. Each subsequent battle takes place on a field with one more cell than the previous one. The dimensions of the fields are flexible, but Petryk finds fields of size 1×k too simple and wants to avoid using them in his game.
The game will feature N battles. Your task is to help Petryk determine the number of cells for the first field so that, for this and the next N-1 fields, at least one can be formed that is not a simple 1×k field.
Input
The input consists of a single integer N (1 ≤ N ≤ 10000).
Output
Output a single integer representing the number of cells on the first of the N consecutive non-simple fields. This number should not be the smallest possible, but it must not exceed 10^4500. If no such number exists, output 0.