Sequence
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Vasya has become intrigued by creating new sequences and examining them. He wrote the following sequence on the board: 1 2 3 2 3 4 3 4 5 4 5 6 5 6 7 ... Now, Vasya wants to know the position in the sequence where the number k first appears.
Write a program to answer his question.
Input
You are given a natural number k (1 ≤ k ≤ 100).
Output
Output a single number, which is the position where the number k first appears in the sequence. The sequence is indexed starting from one.
Examples
Input #1
Answer #1
Submissions 2K
Acceptance rate 57%