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.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class P318A {
    //static long m=1000000007;
    static BigInteger ways(int N,  int K) {
        BigInteger ret = BigInteger.ONE;
        for(int i=N;i>=N-K+1;i--)
        {
             ret = ret.multiply(BigInteger.valueOf(i));
            
        }
        for (int j = 1; j<=K; j++) {
            ret = ret.divide(BigInteger.valueOf(j));
        }
       
            ret=ret.mod(BigInteger.valueOf(1000000007));
        
        return ret;
    }
    public static int prime(int n)
    {
        int f=1;
        if(n==1)
            return 0;
        for(int i=2;i<=(Math.sqrt(n));)
        {
            if(n%i==0)
            {
                f=0;
                break;
            }
            if(i==2)
                i++;
            else
                i+=2;
        }
        if(f==1)
            return 1;
        else 
            return 0;
    }
/*public static long gcd(long x,long y)
{
    if(x%y==0)
        return y;
    else return gcd(y,x%y);
}*/
    public static BigInteger fact(int n)
    {
        BigInteger f=BigInteger.ONE;
        for(int i=1;i<=n;i++)
        {
            f=f.multiply(BigInteger.valueOf(i));
        }
        //f=f.mod(BigInteger.valueOf(m));
        return f;
    }
public static int gcd(int x,int y)
{
    if(x%y==0)
        return y;
    else return gcd(y,x%y);
}
public static int max(int a,int b)
{
    if(a>b)
        return a;
    else
        return b;
}
public static int min(int a,int b)
{
    if(a>b)
        return b;
    else 
        return a;
}
    public static void main(String[] args) throws Exception{
        
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        //Scanner s=new Scanner(System.in);
        StringBuilder sb=new StringBuilder("");
        //int t=Integer.parseInt(br.readLine());
    //  while(t-->0)
        //{
        //int n=Integer.parseInt(br.readLine());
        //String l[]=br.readLine().split(" ");
        //long n=Long.parseLong(br.readLine());
        //l=br.readLine().split(" ");
    //  int m=Integer.parseInt(l[0]);
        //char ch=a.charAt();
    //  char c[]=new char[n];
        //int a[]=new int[n];
        //int a[][]=new int[n][n];
        //HashMap<Integer,Integer>hm=new HashMap<Integer,Integer>();
        //HashMap<Integer,String>hm=new HashMap<Integer,String>();
        //HashMap<Integer,Long>hm=new HashMap<Integer,Long>();
        //hm.put(1,1);
        //HashSet<Integer>hs=new HashSet<Integer>();
        //HashSet<Long>hs=new HashSet<Long>();
        //HashSet<String>hs=new HashSet<String>();
        //hs.add(x);
        //Stack<Integer>s=new Stack<Integer>();
        //s.push(x);
        //s.pop(x);
        //Queue<Integer>q=new LinkedList<Integer>();
        //q.add(x);
        //q.remove(x);
        //long a[]=new long[n];
        //long x=Long.parseLong(l[0]);
        //for(int i=0;i<n;i++)
        //{
            //a[i]=Long.parseLong(l[i]);
        //}
        //int min=100000000;
    //  String a=br.readLine();
        //for(int i=0;i<n;i++)
        //{
            //a[i]=Integer.parseInt(l[i]);
        //}
        // char a[]=c.toCharArray();
        //char ch=l[0].charAt(0);
        //long c1=(long)Math.ceil(n/(double)a);
        //Arrays.sort(a);
          // int f1[]=new int[26];
           //int f2[]=new int[26];
        //for(int i=0;i<n;i++)
        //{
        //int x=a.charAt(0);
            //f1[x-97]++;
        //}
        /*for(int i=0;i<n;i++)
        {
            for(int j=0;j<n;j++)
            {
                
            }
        }*/
        String l[]=br.readLine().split(" ");
        long n=Long.parseLong(l[0]);
        long k=Long.parseLong(l[1]);
        if(n%2==0)
        {
            if(k<=(long)Math.ceil(n/2.0))
            {
                System.out.print((2*k)-1);
            }
            else
            {
                k=k-(long)Math.ceil(n/2.0);
                System.out.print(2*(k));
            }
        }
        else
        {
            if(k<=(long)Math.ceil(n/2.0))
            {
                System.out.print((2*k)-1);
            }
            else
            {
                k=k-(long)Math.ceil(n/2.0);
                System.out.print(2*(k));
            }
        }
            
        
                
        
        //}
    }
}