#K53792. Minimum Number of Packages

    ID: 29610 Type: Default 1000ms 256MiB

Minimum Number of Packages

Minimum Number of Packages

You are given an integer \(n\) (1 \(\le\) n \(\le\) 105), representing the total number of items a customer purchases (including any free items). Your task is to determine the minimum number of packages required to pack all the items under the following conditions:

  • The items are distributed as evenly as possible among the packages, meaning the number of items in any two packages differs by no more than 1.
  • No package can contain more than 7 items.

This essentially means you need to find the smallest integer \(k\) such that when \(n\) items are divided into \(k\) packages, each package receives at most 7 items. Mathematically, you must find:

\(\text{Answer} = \lceil n / 7 \rceil\)

For example, if \(n=8\), you cannot pack all items in one package (since 8 > 7), so you need 2 packages: each holding 4 items (or as evenly distributed as possible with a difference of at most 1).

inputFormat

The input consists of a single integer \(n\) (1 \(\le\) n \(\le\) 105), representing the total number of items purchased.

outputFormat

Output a single integer denoting the minimum number of packages required to pack all the items following the given rules.

## sample
1
1