#K86912. Minimum Tokens for a Hexagonal Grid

    ID: 36970 Type: Default 1000ms 256MiB

Minimum Tokens for a Hexagonal Grid

Minimum Tokens for a Hexagonal Grid

You are given an n × n hexagonal grid. Your task is to determine the minimum number of different token types needed to fill the grid such that no two adjacent tokens are the same.

Note that when the grid consists of a single cell ($n=1$), only one token is necessary. For any grid where $n \ge 2$, two distinct tokens are sufficient.

Example:

  • For input 1, the output is 1.
  • For input 2 (or larger), the output is 2.

inputFormat

The input consists of a single integer n ($1 \le n \le 10^9$) representing the size of the hexagonal grid.

outputFormat

Output a single integer: the minimum number of different tokens required to fill the grid under the given conditions.

## sample
1
1