Under construction

Still being built. Things may change

Walking

Time limit2sMemory limit2048 MB

Summary
Given X, compute the net forward distance after X alternating moves of 3 m forward (A) and 2 m backward (B), starting with A.
Level

Easy1 of 10

Topics
Simulation, Math
Solved
No attempts yet

Problem

JOI is walking on a straight road.

JOI repeats the following two actions in alternating order: action A, action B, action A, and so on.

  • Action A: move 3 m forward.
  • Action B: move 2 m backward.

After performing action A and action B a total of X times, how many meters forward from the starting position has JOI moved?

Input

The input is given in the following format.

X

Output

Print the distance moved forward from the starting position in meters, without the unit (m).

Print nothing except the answer. (Do not print prompts such as a request for input.)

Constraints

1 ≦ X ≦ 100.

X is an integer.

Examples5

  1. Example 1

    Input
    3
    
    Expected output
    4
    
  2. Example 2

    Input
    6
    
    Expected output
    3
    
  3. Example 3

    Input
    1
    
    Expected output
    3
    
  4. Example 4

    Input
    37
    
    Expected output
    21
    
  5. Example 5

    Input
    100
    
    Expected output
    50