import java.nio.file.*;
import java.nio.charset.*;
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();
        Integer[] arr = {a, a - 1, b, b - 1};
        Arrays.sort(arr, Comparator.reverseOrder());
        System.out.println(arr[0]+arr[1]);
    }
    }
 import java.nio.file.*; file.* java.nio import java.nio.charset.*; charset.* java.nio 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();
        Integer[] arr = {a, a - 1, b, b - 1};
        Arrays.sort(arr, Comparator.reverseOrder());
        System.out.println(arr[0]+arr[1]);
    }
    } Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        Integer[] arr = {a, a - 1, b, b - 1};
        Arrays.sort(arr, Comparator.reverseOrder());
        System.out.println(arr[0]+arr[1]);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        Integer[] arr = {a, a - 1, b, b - 1};
        Arrays.sort(arr, Comparator.reverseOrder());
        System.out.println(arr[0]+arr[1]);
    } 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 Integer[] arr = {a, a - 1, b, b - 1}; arr {a, a - 1, b, b - 1} a a - 1 a 1 b b - 1 b 1 Arrays.sort(arr, Comparator.reverseOrder()) Arrays.sort Arrays arr Comparator.reverseOrder() Comparator.reverseOrder Comparator System.out.println(arr[0]+arr[1]) System.out.println System.out System System.out arr[0]+arr[1] arr[0] arr 0 arr[1] arr 1 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();
        Integer[] arr = {a, a - 1, b, b - 1};
        Arrays.sort(arr, Comparator.reverseOrder());
        System.out.println(arr[0]+arr[1]);
    }
    } public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        Integer[] arr = {a, a - 1, b, b - 1};
        Arrays.sort(arr, Comparator.reverseOrder());
        System.out.println(arr[0]+arr[1]);
    }
    } Main
import java.nio.file.*;
import java.nio.charset.*;
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();
        Integer[] arr = {a, a - 1, b, b - 1};
        Arrays.sort(arr, Comparator.reverseOrder());
        System.out.println(arr[0]+arr[1]);
    }
    }

