Being a nonconformist, Volodya is displeased with the current state of things, particularly with the order of natural numbers (natural number is positive integer number). He is determined to rearrange them. But there are too many natural numbers, so Volodya decided to start with the first *n*. He writes down the following sequence of numbers: firstly all odd integers from 1 to *n* (in ascending order), then all even integers from 1 to *n* (also in ascending order). Help our hero to find out which number will stand at the position number *k*.
The only line of input contains integers *n* and *k* (1 ≤ *k* ≤ *n* ≤ 10<sup class="upper-index">12</sup>).

Please, do not use the %lld specifier to read or write 64-bit integers in C++. It is preferred to use the cin, cout streams or the %I64d specifier.
# 318A

# Let's try to find a pattern because N can become
# very large and we won't be able to use an algo to solve
# at larger numbers.

# If N is 10, then the list of numbers is as follows:
# [1, 3, 5, 7, 9, 2, 4, 6, 8, 10]
# K 1 is 1  K 6 is 2
# K 2 is 3  K 7 is 4
# K 3 is 5  K 8 is 6
# K 4 is 7  K 9 is 8
# K 5 is 9  K10 is 10

# For a number between 1 and 5, inclusive, the answer is 
# 1 + (positioni - position1)*2
# So for K 3, it's 1 + (3 - 1)*2, or 1 + 2*2, or 1 + 4.
# We essentially multiply the spaces after the first position
# by 2 and then add 1 to it because that's our starting point.

# For a number between 6 and 10, inclusive, the answer
# is similar. Except instead of taking 1, we take the length
# of the (number/2 + 1) and use that as our starting position
# for the count.

# So for K = 8, it's 10/2+1 == 5+1, or 6 as our starting position
# for the evens. 8 is 2 positions away from 6, so 2 * 2 = 4. Then
# we add 4 to the first even integer of 2 and get 6. So the
# 8th number in the sequence is 6. The 9th is 9-6 = 3. 3*2 = 6,
# 6+2 = 8.

# This pattern works for even numbers, but what about odds?
# [1, 3, 5, 7, 2, 4, 6]
# Here, the first even number is at the position of the length
# of the (list+1)/2 From the middle point, we can calculate
# the ith position. 

givenValues = [int(i) for i in input().split()]

numberLength = givenValues[0]
targetNumber = givenValues[1]

oddLength = 0
# oddLength is the number of elements in the list of numbers
# in the given number that are odd. So for 10, the oddLength
# is 1,3,5,7,9 which is 5 total numbers. 

output = 0

if numberLength % 2 == 0:
    oddLength = numberLength//2
else:
    oddLength = (numberLength+1)//2

if targetNumber <= oddLength:
    output = ((targetNumber-1)*2)+1
elif targetNumber > oddLength:
    output = (targetNumber-oddLength)*2
    
print(output)