Crystal (Unknown)#8650

Crystal (Unknown)

0.2 seconds
64 megabytes
Medium

The precious stone Anknown has a unique crystal lattice that allows it to be split into either eight or twelve pieces in a single break. For jewelry crafting, you need exactly parts. Determine the minimum number of breaks required to achieve this from a single crystal.

Input

The input consists of a single integer — representing the number of parts needed (1 \le N \le 1000000).

Output

Output the minimum number of breaks required. If it is impossible to obtain exactly parts, output .

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading