A non-negative integer is called evil
if has an even number of ones in its binary representation. Similarly, a
non-negative integer is called odious if has an odd number of ones in
its binary representation. Let us write down evil and odious numbers in ascending
order.
Number index
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
13
|
14
|
…
|
Evil number
|
0
|
3
|
5
|
6
|
9
|
10
|
12
|
15
|
17
|
18
|
20
|
23
|
24
|
27
|
…
|
Odious
number
|
1
|
2
|
4
|
7
|
8
|
11
|
13
|
14
|
16
|
19
|
21
|
22
|
25
|
26
|
…
|
Let E(n) be the n-th
evil number in this list. Similarly, let O(n) be the n-th
odious number.
Write a program to calculate the sum of n-th
evil and odious numbers E(n) + O(n) given their
index n.
Limitations
1 ≤ n ≤ 1 000 000.
Input
The input file contains a single integer, n.
Output
The output file should contain a single
integer, the sum E(n) + O(n).
Example
Input
|
Output
|
1
|
1
|
Input
|
Output
|
10
|
37
|