P26360 [AtCoder] Three Steps Forward, Two Steps Back
普及+
题目描述

Problem Description

Takahashi moves 3 steps forward on odd-numbered days and 2 steps backward on even-numbered days.

The distance of one step is the same whether moving forward or backward.

Output how many steps forward Takahashi has moved from day 1 to day \( n \).

Input Format

The input is given from the standard input in the following format:

\( n \)

  • The first line contains an integer \( n \) (\( 1 \leq n \leq 10^{15} \)) representing the number of days.

Output Format

Output a single line with the number of steps forward Takahashi has moved. The output should end with a newline.

Sample Input and Output

Sample Input #1

6

Sample Output #1

3

Sample Input #2

999999999999999

Sample Output #2

500000000000002

Notes/Hints

Sample Explanation 1

On days 1, 3, and 5, Takahashi moves 3 steps forward, and on days 2, 4, and 6, he moves 2 steps backward. Therefore, he moves \( 3 - 2 + 3 - 2 + 3 - 2 = 3 \) steps forward.

Sample Explanation 2

No matter how long the period is, Takahashi continues to move 3 steps forward and 2 steps backward.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
6
样例输出
3