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.

Input

The only line of input contains integers n and k (1 ≤ k ≤ n ≤ 1012).

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.

Output

Print the number that will stand at the position number k after Volodya's manipulations.

Examples

Input

10 3


Output

5

Input

7 7


Output

6

Note

In the first sample Volodya's sequence will look like this: {1, 3, 5, 7, 9, 2, 4, 6, 8, 10}. The third place in the sequence is therefore occupied by the number 5.
import java.util.*;

//import jdk.vm.ci.aarch64.AArch64.Flag;

import java.lang.*;
import java.io.*;



public class Solution{
    
    public static void main(final String[] args) {

        final FastReader br = new FastReader();
        StringBuilder sbuf  = new StringBuilder();

        long no = br.nextLong();
        long k = br.nextLong();
       
        long val  = k*1+(k-1);

        if(val<=no)
        System.out.println(val);
        else{
            long even = no/2;
            long odd = no-even;

            long v = k-odd;
            System.out.println(2*v);
        }
        
       
    }


    

   
   
   
   

}


/*
    * this class is created to take fast input output 
    * it's an user defined class 
*/
 class FastReader {
    BufferedReader br;
    StringTokenizer st;

    public FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (final IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    String nextLine() {
        String str = "";
        try {
            str = br.readLine();
        } catch (final IOException e) {
            e.printStackTrace();
        }
        return str;
    }

    int[] nextIntLine() {
        String str = "";
        try {
            str = br.readLine();
        } catch (final IOException e) {
            e.printStackTrace();
        }
    
        int[] array = Arrays.stream(str.split("\\s+")).mapToInt(Integer::parseInt).toArray();
        return array;
        }


    int[][] nextMatrix(int r,int c){
        int[][] arr = new int[r][c];

        for(int i=0;i<r;i++)
        arr[i] = nextIntLine();


        return arr;

    }
 } 