Preparation for the Chess Olympiad
At Stepan's university, a chess olympiad was announced. To prepare, Stepan decided to practice with his neighbor Robert, humorously nicknamed Fischer by the locals. Robert, a skilled chess player, was happy to assist Stepan.
In their initial matches, Stepan lost the first two games, then managed a draw, followed by a win. Robert then switched his opening strategy, leading to another loss for Stepan, a draw, and then another win. This pattern continued: each time Robert changed his opening, Stepan would lose, draw, and then win. They played many games in total, with this sequence repeating consistently: a loss, a draw, and a win for Stepan. Your task is to determine how many losses Stepan incurred in the first N
games.
Input
The input consists of a single integer, N
, representing the number of games played (0 ≤ N ≤ 10^18
).
Output
Output a single integer, which is the number of losses Stepan experienced in the first N
games against Robert.