import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans;

        if(a>b){
            int c = a-1;
                if(c>=b){
                    ans = a+a-1;
                    System.out.println(ans);
                }else{
                    ans = a+b;
                    System.out.println(ans);
                }
        }else if (a==b){
            ans = a+b;
            System.out.println(ans);
        }else if (a<b){
            int c = b-1;
                if(c>=a){
                    ans = b+b-1;
                    System.out.println(ans);
                }else if(c<a){
                    ans = a+b;
                    System.out.println(ans);
                }

        }
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans;

        if(a>b){
            int c = a-1;
                if(c>=b){
                    ans = a+a-1;
                    System.out.println(ans);
                }else{
                    ans = a+b;
                    System.out.println(ans);
                }
        }else if (a==b){
            ans = a+b;
            System.out.println(ans);
        }else if (a<b){
            int c = b-1;
                if(c>=a){
                    ans = b+b-1;
                    System.out.println(ans);
                }else if(c<a){
                    ans = a+b;
                    System.out.println(ans);
                }

        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans;

        if(a>b){
            int c = a-1;
                if(c>=b){
                    ans = a+a-1;
                    System.out.println(ans);
                }else{
                    ans = a+b;
                    System.out.println(ans);
                }
        }else if (a==b){
            ans = a+b;
            System.out.println(ans);
        }else if (a<b){
            int c = b-1;
                if(c>=a){
                    ans = b+b-1;
                    System.out.println(ans);
                }else if(c<a){
                    ans = a+b;
                    System.out.println(ans);
                }

        }
    } main {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans;

        if(a>b){
            int c = a-1;
                if(c>=b){
                    ans = a+a-1;
                    System.out.println(ans);
                }else{
                    ans = a+b;
                    System.out.println(ans);
                }
        }else if (a==b){
            ans = a+b;
            System.out.println(ans);
        }else if (a<b){
            int c = b-1;
                if(c>=a){
                    ans = b+b-1;
                    System.out.println(ans);
                }else if(c<a){
                    ans = a+b;
                    System.out.println(ans);
                }

        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int ans; ans if(a>b){
            int c = a-1;
                if(c>=b){
                    ans = a+a-1;
                    System.out.println(ans);
                }else{
                    ans = a+b;
                    System.out.println(ans);
                }
        }else if (a==b){
            ans = a+b;
            System.out.println(ans);
        }else if (a<b){
            int c = b-1;
                if(c>=a){
                    ans = b+b-1;
                    System.out.println(ans);
                }else if(c<a){
                    ans = a+b;
                    System.out.println(ans);
                }

        } a>b a b {
            int c = a-1;
                if(c>=b){
                    ans = a+a-1;
                    System.out.println(ans);
                }else{
                    ans = a+b;
                    System.out.println(ans);
                }
        } int c = a-1; c a-1 a 1 if(c>=b){
                    ans = a+a-1;
                    System.out.println(ans);
                }else{
                    ans = a+b;
                    System.out.println(ans);
                } c>=b c b {
                    ans = a+a-1;
                    System.out.println(ans);
                } ans = a+a-1 ans a+a-1 a+a a a 1 System.out.println(ans) System.out.println System.out System System.out ans {
                    ans = a+b;
                    System.out.println(ans);
                } ans = a+b ans a+b a b System.out.println(ans) System.out.println System.out System System.out ans if (a==b){
            ans = a+b;
            System.out.println(ans);
        }else if (a<b){
            int c = b-1;
                if(c>=a){
                    ans = b+b-1;
                    System.out.println(ans);
                }else if(c<a){
                    ans = a+b;
                    System.out.println(ans);
                }

        } a==b a b {
            ans = a+b;
            System.out.println(ans);
        } ans = a+b ans a+b a b System.out.println(ans) System.out.println System.out System System.out ans if (a<b){
            int c = b-1;
                if(c>=a){
                    ans = b+b-1;
                    System.out.println(ans);
                }else if(c<a){
                    ans = a+b;
                    System.out.println(ans);
                }

        } a<b a b {
            int c = b-1;
                if(c>=a){
                    ans = b+b-1;
                    System.out.println(ans);
                }else if(c<a){
                    ans = a+b;
                    System.out.println(ans);
                }

        } int c = b-1; c b-1 b 1 if(c>=a){
                    ans = b+b-1;
                    System.out.println(ans);
                }else if(c<a){
                    ans = a+b;
                    System.out.println(ans);
                } c>=a c a {
                    ans = b+b-1;
                    System.out.println(ans);
                } ans = b+b-1 ans b+b-1 b+b b b 1 System.out.println(ans) System.out.println System.out System System.out ans if(c<a){
                    ans = a+b;
                    System.out.println(ans);
                } c<a c a {
                    ans = a+b;
                    System.out.println(ans);
                } ans = a+b ans a+b a b System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans;

        if(a>b){
            int c = a-1;
                if(c>=b){
                    ans = a+a-1;
                    System.out.println(ans);
                }else{
                    ans = a+b;
                    System.out.println(ans);
                }
        }else if (a==b){
            ans = a+b;
            System.out.println(ans);
        }else if (a<b){
            int c = b-1;
                if(c>=a){
                    ans = b+b-1;
                    System.out.println(ans);
                }else if(c<a){
                    ans = a+b;
                    System.out.println(ans);
                }

        }
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans;

        if(a>b){
            int c = a-1;
                if(c>=b){
                    ans = a+a-1;
                    System.out.println(ans);
                }else{
                    ans = a+b;
                    System.out.println(ans);
                }
        }else if (a==b){
            ans = a+b;
            System.out.println(ans);
        }else if (a<b){
            int c = b-1;
                if(c>=a){
                    ans = b+b-1;
                    System.out.println(ans);
                }else if(c<a){
                    ans = a+b;
                    System.out.println(ans);
                }

        }
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans;

        if(a>b){
            int c = a-1;
                if(c>=b){
                    ans = a+a-1;
                    System.out.println(ans);
                }else{
                    ans = a+b;
                    System.out.println(ans);
                }
        }else if (a==b){
            ans = a+b;
            System.out.println(ans);
        }else if (a<b){
            int c = b-1;
                if(c>=a){
                    ans = b+b-1;
                    System.out.println(ans);
                }else if(c<a){
                    ans = a+b;
                    System.out.println(ans);
                }

        }
    }
}