import java.util.*;

public class Main {
    public static void main(String args[])
    {
        Scanner s = new Scanner(System.in);
        int n=s.nextInt();
        int b=s.nextInt();
        int ans = n+b;
        int ans1 = n+n-1;
        int ans2 = b+b-1;
        System.out.println(Math.max(ans,Math.max(ans1,ans2)));
    }
} import java.util.*; util.* java public class Main {
    public static void main(String args[])
    {
        Scanner s = new Scanner(System.in);
        int n=s.nextInt();
        int b=s.nextInt();
        int ans = n+b;
        int ans1 = n+n-1;
        int ans2 = b+b-1;
        System.out.println(Math.max(ans,Math.max(ans1,ans2)));
    }
} Main public static void main(String args[])
    {
        Scanner s = new Scanner(System.in);
        int n=s.nextInt();
        int b=s.nextInt();
        int ans = n+b;
        int ans1 = n+n-1;
        int ans2 = b+b-1;
        System.out.println(Math.max(ans,Math.max(ans1,ans2)));
    } main {
        Scanner s = new Scanner(System.in);
        int n=s.nextInt();
        int b=s.nextInt();
        int ans = n+b;
        int ans1 = n+n-1;
        int ans2 = b+b-1;
        System.out.println(Math.max(ans,Math.max(ans1,ans2)));
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int n=s.nextInt(); n s.nextInt() s.nextInt s int b=s.nextInt(); b s.nextInt() s.nextInt s int ans = n+b; ans n+b n b int ans1 = n+n-1; ans1 n+n-1 n+n n n 1 int ans2 = b+b-1; ans2 b+b-1 b+b b b 1 System.out.println(Math.max(ans,Math.max(ans1,ans2))) System.out.println System.out System System.out Math.max(ans,Math.max(ans1,ans2)) Math.max Math ans Math.max(ans1,ans2) Math.max Math ans1 ans2 String args[] args public class Main {
    public static void main(String args[])
    {
        Scanner s = new Scanner(System.in);
        int n=s.nextInt();
        int b=s.nextInt();
        int ans = n+b;
        int ans1 = n+n-1;
        int ans2 = b+b-1;
        System.out.println(Math.max(ans,Math.max(ans1,ans2)));
    }
} public class Main {
    public static void main(String args[])
    {
        Scanner s = new Scanner(System.in);
        int n=s.nextInt();
        int b=s.nextInt();
        int ans = n+b;
        int ans1 = n+n-1;
        int ans2 = b+b-1;
        System.out.println(Math.max(ans,Math.max(ans1,ans2)));
    }
} Main
import java.util.*;

public class Main {
    public static void main(String args[])
    {
        Scanner s = new Scanner(System.in);
        int n=s.nextInt();
        int b=s.nextInt();
        int ans = n+b;
        int ans1 = n+n-1;
        int ans2 = b+b-1;
        System.out.println(Math.max(ans,Math.max(ans1,ans2)));
    }
}
