import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

class Main {

    public static void main(String[] args) throws Exception {

        try {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> input = Arrays.asList(br.readLine().split(" "));
            List<Integer> countCoins = new ArrayList<>();

            for (String s : input) {
                countCoins.add(Integer.parseInt(s));
            }

            sortNatualOrder(countCoins);

            int countOfCoinA = countCoins.get(0);
            int countOfCoinB = countCoins.get(1);

            int result = countOfCoinA + countOfCoinB;
            if (result < countOfCoinB * 2 - 1) {
                result = countOfCoinB * 2 - 1;
            }

            System.out.println(result);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }

    private static void sortNatualOrder(List<Integer> intList) {
        int tmp = intList.get(1);
        if (intList.get(0) > intList.get(1)) {
            intList.set(1, intList.get(0));
            intList.set(0, tmp);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.List; List java.util class Main {

    public static void main(String[] args) throws Exception {

        try {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> input = Arrays.asList(br.readLine().split(" "));
            List<Integer> countCoins = new ArrayList<>();

            for (String s : input) {
                countCoins.add(Integer.parseInt(s));
            }

            sortNatualOrder(countCoins);

            int countOfCoinA = countCoins.get(0);
            int countOfCoinB = countCoins.get(1);

            int result = countOfCoinA + countOfCoinB;
            if (result < countOfCoinB * 2 - 1) {
                result = countOfCoinB * 2 - 1;
            }

            System.out.println(result);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }

    private static void sortNatualOrder(List<Integer> intList) {
        int tmp = intList.get(1);
        if (intList.get(0) > intList.get(1)) {
            intList.set(1, intList.get(0));
            intList.set(0, tmp);
        }
    }
} Main public static void main(String[] args) throws Exception {

        try {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> input = Arrays.asList(br.readLine().split(" "));
            List<Integer> countCoins = new ArrayList<>();

            for (String s : input) {
                countCoins.add(Integer.parseInt(s));
            }

            sortNatualOrder(countCoins);

            int countOfCoinA = countCoins.get(0);
            int countOfCoinB = countCoins.get(1);

            int result = countOfCoinA + countOfCoinB;
            if (result < countOfCoinB * 2 - 1) {
                result = countOfCoinB * 2 - 1;
            }

            System.out.println(result);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    } main {

        try {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> input = Arrays.asList(br.readLine().split(" "));
            List<Integer> countCoins = new ArrayList<>();

            for (String s : input) {
                countCoins.add(Integer.parseInt(s));
            }

            sortNatualOrder(countCoins);

            int countOfCoinA = countCoins.get(0);
            int countOfCoinB = countCoins.get(1);

            int result = countOfCoinA + countOfCoinB;
            if (result < countOfCoinB * 2 - 1) {
                result = countOfCoinB * 2 - 1;
            }

            System.out.println(result);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    } try {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> input = Arrays.asList(br.readLine().split(" "));
            List<Integer> countCoins = new ArrayList<>();

            for (String s : input) {
                countCoins.add(Integer.parseInt(s));
            }

            sortNatualOrder(countCoins);

            int countOfCoinA = countCoins.get(0);
            int countOfCoinB = countCoins.get(1);

            int result = countOfCoinA + countOfCoinB;
            if (result < countOfCoinB * 2 - 1) {
                result = countOfCoinB * 2 - 1;
            }

            System.out.println(result);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } IOException | NumberFormatException e {
            e.printStackTrace();
            System.exit(0);
        } e.printStackTrace() e.printStackTrace e System.exit(0) System.exit System 0 catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        } final Exception e {
            e.printStackTrace();
            System.exit(0);
        } e.printStackTrace() e.printStackTrace e System.exit(0) System.exit System 0 {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> input = Arrays.asList(br.readLine().split(" "));
            List<Integer> countCoins = new ArrayList<>();

            for (String s : input) {
                countCoins.add(Integer.parseInt(s));
            }

            sortNatualOrder(countCoins);

            int countOfCoinA = countCoins.get(0);
            int countOfCoinB = countCoins.get(1);

            int result = countOfCoinA + countOfCoinB;
            if (result < countOfCoinB * 2 - 1) {
                result = countOfCoinB * 2 - 1;
            }

            System.out.println(result);
        } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) List<String> input = Arrays.asList(br.readLine().split(" ")); input Arrays.asList(br.readLine().split(" ")) Arrays.asList Arrays br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " List<Integer> countCoins = new ArrayList<>(); countCoins new ArrayList<>() for (String s : input) {
                countCoins.add(Integer.parseInt(s));
            } String s input {
                countCoins.add(Integer.parseInt(s));
            } {
                countCoins.add(Integer.parseInt(s));
            } countCoins.add(Integer.parseInt(s)) countCoins.add countCoins Integer.parseInt(s) Integer.parseInt Integer s sortNatualOrder(countCoins) sortNatualOrder countCoins int countOfCoinA = countCoins.get(0); countOfCoinA countCoins.get(0) countCoins.get countCoins 0 int countOfCoinB = countCoins.get(1); countOfCoinB countCoins.get(1) countCoins.get countCoins 1 int result = countOfCoinA + countOfCoinB; result countOfCoinA + countOfCoinB countOfCoinA countOfCoinB if (result < countOfCoinB * 2 - 1) {
                result = countOfCoinB * 2 - 1;
            } result < countOfCoinB * 2 - 1 result countOfCoinB * 2 - 1 countOfCoinB * 2 countOfCoinB 2 1 {
                result = countOfCoinB * 2 - 1;
            } result = countOfCoinB * 2 - 1 result countOfCoinB * 2 - 1 countOfCoinB * 2 countOfCoinB 2 1 System.out.println(result) System.out.println System.out System System.out result String[] args args private static void sortNatualOrder(List<Integer> intList) {
        int tmp = intList.get(1);
        if (intList.get(0) > intList.get(1)) {
            intList.set(1, intList.get(0));
            intList.set(0, tmp);
        }
    } sortNatualOrder {
        int tmp = intList.get(1);
        if (intList.get(0) > intList.get(1)) {
            intList.set(1, intList.get(0));
            intList.set(0, tmp);
        }
    } int tmp = intList.get(1); tmp intList.get(1) intList.get intList 1 if (intList.get(0) > intList.get(1)) {
            intList.set(1, intList.get(0));
            intList.set(0, tmp);
        } intList.get(0) > intList.get(1) intList.get(0) intList.get intList 0 intList.get(1) intList.get intList 1 {
            intList.set(1, intList.get(0));
            intList.set(0, tmp);
        } intList.set(1, intList.get(0)) intList.set intList 1 intList.get(0) intList.get intList 0 intList.set(0, tmp) intList.set intList 0 tmp List<Integer> intList intList
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

class Main {

    public static void main(String[] args) throws Exception {

        try {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> input = Arrays.asList(br.readLine().split(" "));
            List<Integer> countCoins = new ArrayList<>();

            for (String s : input) {
                countCoins.add(Integer.parseInt(s));
            }

            sortNatualOrder(countCoins);

            int countOfCoinA = countCoins.get(0);
            int countOfCoinB = countCoins.get(1);

            int result = countOfCoinA + countOfCoinB;
            if (result < countOfCoinB * 2 - 1) {
                result = countOfCoinB * 2 - 1;
            }

            System.out.println(result);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }

    private static void sortNatualOrder(List<Integer> intList) {
        int tmp = intList.get(1);
        if (intList.get(0) > intList.get(1)) {
            intList.set(1, intList.get(0));
            intList.set(0, tmp);
        }
    }
}