import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner entrada = new Scanner(System.in);
        int A = entrada.nextInt();
        int B = entrada.nextInt();
        int C = A+(A-1);
        int D= A+B;
        int E= B+(B-1);
        int F=Math.max((Math.max(C, E)), D);
        System.out.println(F);
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner entrada = new Scanner(System.in);
        int A = entrada.nextInt();
        int B = entrada.nextInt();
        int C = A+(A-1);
        int D= A+B;
        int E= B+(B-1);
        int F=Math.max((Math.max(C, E)), D);
        System.out.println(F);
    }
} Main public static void main(String[] args) {
        Scanner entrada = new Scanner(System.in);
        int A = entrada.nextInt();
        int B = entrada.nextInt();
        int C = A+(A-1);
        int D= A+B;
        int E= B+(B-1);
        int F=Math.max((Math.max(C, E)), D);
        System.out.println(F);
    } main {
        Scanner entrada = new Scanner(System.in);
        int A = entrada.nextInt();
        int B = entrada.nextInt();
        int C = A+(A-1);
        int D= A+B;
        int E= B+(B-1);
        int F=Math.max((Math.max(C, E)), D);
        System.out.println(F);
    } Scanner entrada = new Scanner(System.in); entrada new Scanner(System.in) int A = entrada.nextInt(); A entrada.nextInt() entrada.nextInt entrada int B = entrada.nextInt(); B entrada.nextInt() entrada.nextInt entrada int C = A+(A-1); C A+(A-1) A (A-1) A 1 int D= A+B; D A+B A B int E= B+(B-1); E B+(B-1) B (B-1) B 1 int F=Math.max((Math.max(C, E)), D); F Math.max((Math.max(C, E)), D) Math.max Math (Math.max(C, E)) Math.max Math C E D System.out.println(F) System.out.println System.out System System.out F String[] args args public class Main {

    public static void main(String[] args) {
        Scanner entrada = new Scanner(System.in);
        int A = entrada.nextInt();
        int B = entrada.nextInt();
        int C = A+(A-1);
        int D= A+B;
        int E= B+(B-1);
        int F=Math.max((Math.max(C, E)), D);
        System.out.println(F);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner entrada = new Scanner(System.in);
        int A = entrada.nextInt();
        int B = entrada.nextInt();
        int C = A+(A-1);
        int D= A+B;
        int E= B+(B-1);
        int F=Math.max((Math.max(C, E)), D);
        System.out.println(F);
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner entrada = new Scanner(System.in);
        int A = entrada.nextInt();
        int B = entrada.nextInt();
        int C = A+(A-1);
        int D= A+B;
        int E= B+(B-1);
        int F=Math.max((Math.max(C, E)), D);
        System.out.println(F);
    }
}
