Given a natural number (8 \leq N \leq 1000000), which represents any integer sum of money not exceeding . It is known that any integer sum of money greater than or equal to units can be given only using bills with denominations of and units. Determine the minimal number of bills of and units needed to make up the sum of units.
A single number — the given sum.
A single number — the required minimum number of bills.
Example 1