import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int sum = 0;
    int inputA = scanner.nextInt();
    int inputB = scanner.nextInt();
    if(inputA >= 3 && inputB <= 20){
      if(inputB >= 3 && inputB <= 20){
        if(inputA > inputB + 1){
          sum = inputA + inputA - 1;
        }else if(inputB > inputA + 1){
          sum = inputB + inputB - 1;
        }else if(inputA == inputB + 1 || inputB == inputA + 1){
          sum = inputA + inputB;
        }else{
          sum = inputA + inputB;
        }
      }else{
        System.exit(1);
      }
    }else{
      System.exit(1);
    }
    System.out.println(sum);
    scanner.close();
  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int sum = 0;
    int inputA = scanner.nextInt();
    int inputB = scanner.nextInt();
    if(inputA >= 3 && inputB <= 20){
      if(inputB >= 3 && inputB <= 20){
        if(inputA > inputB + 1){
          sum = inputA + inputA - 1;
        }else if(inputB > inputA + 1){
          sum = inputB + inputB - 1;
        }else if(inputA == inputB + 1 || inputB == inputA + 1){
          sum = inputA + inputB;
        }else{
          sum = inputA + inputB;
        }
      }else{
        System.exit(1);
      }
    }else{
      System.exit(1);
    }
    System.out.println(sum);
    scanner.close();
  }
} Main public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int sum = 0;
    int inputA = scanner.nextInt();
    int inputB = scanner.nextInt();
    if(inputA >= 3 && inputB <= 20){
      if(inputB >= 3 && inputB <= 20){
        if(inputA > inputB + 1){
          sum = inputA + inputA - 1;
        }else if(inputB > inputA + 1){
          sum = inputB + inputB - 1;
        }else if(inputA == inputB + 1 || inputB == inputA + 1){
          sum = inputA + inputB;
        }else{
          sum = inputA + inputB;
        }
      }else{
        System.exit(1);
      }
    }else{
      System.exit(1);
    }
    System.out.println(sum);
    scanner.close();
  } main {
    Scanner scanner = new Scanner(System.in);
    int sum = 0;
    int inputA = scanner.nextInt();
    int inputB = scanner.nextInt();
    if(inputA >= 3 && inputB <= 20){
      if(inputB >= 3 && inputB <= 20){
        if(inputA > inputB + 1){
          sum = inputA + inputA - 1;
        }else if(inputB > inputA + 1){
          sum = inputB + inputB - 1;
        }else if(inputA == inputB + 1 || inputB == inputA + 1){
          sum = inputA + inputB;
        }else{
          sum = inputA + inputB;
        }
      }else{
        System.exit(1);
      }
    }else{
      System.exit(1);
    }
    System.out.println(sum);
    scanner.close();
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int sum = 0; sum 0 int inputA = scanner.nextInt(); inputA scanner.nextInt() scanner.nextInt scanner int inputB = scanner.nextInt(); inputB scanner.nextInt() scanner.nextInt scanner if(inputA >= 3 && inputB <= 20){
      if(inputB >= 3 && inputB <= 20){
        if(inputA > inputB + 1){
          sum = inputA + inputA - 1;
        }else if(inputB > inputA + 1){
          sum = inputB + inputB - 1;
        }else if(inputA == inputB + 1 || inputB == inputA + 1){
          sum = inputA + inputB;
        }else{
          sum = inputA + inputB;
        }
      }else{
        System.exit(1);
      }
    }else{
      System.exit(1);
    } inputA >= 3 && inputB <= 20 inputA >= 3 inputA 3 inputB <= 20 inputB 20 {
      if(inputB >= 3 && inputB <= 20){
        if(inputA > inputB + 1){
          sum = inputA + inputA - 1;
        }else if(inputB > inputA + 1){
          sum = inputB + inputB - 1;
        }else if(inputA == inputB + 1 || inputB == inputA + 1){
          sum = inputA + inputB;
        }else{
          sum = inputA + inputB;
        }
      }else{
        System.exit(1);
      }
    } if(inputB >= 3 && inputB <= 20){
        if(inputA > inputB + 1){
          sum = inputA + inputA - 1;
        }else if(inputB > inputA + 1){
          sum = inputB + inputB - 1;
        }else if(inputA == inputB + 1 || inputB == inputA + 1){
          sum = inputA + inputB;
        }else{
          sum = inputA + inputB;
        }
      }else{
        System.exit(1);
      } inputB >= 3 && inputB <= 20 inputB >= 3 inputB 3 inputB <= 20 inputB 20 {
        if(inputA > inputB + 1){
          sum = inputA + inputA - 1;
        }else if(inputB > inputA + 1){
          sum = inputB + inputB - 1;
        }else if(inputA == inputB + 1 || inputB == inputA + 1){
          sum = inputA + inputB;
        }else{
          sum = inputA + inputB;
        }
      } if(inputA > inputB + 1){
          sum = inputA + inputA - 1;
        }else if(inputB > inputA + 1){
          sum = inputB + inputB - 1;
        }else if(inputA == inputB + 1 || inputB == inputA + 1){
          sum = inputA + inputB;
        }else{
          sum = inputA + inputB;
        } inputA > inputB + 1 inputA inputB + 1 inputB 1 {
          sum = inputA + inputA - 1;
        } sum = inputA + inputA - 1 sum inputA + inputA - 1 inputA + inputA inputA inputA 1 if(inputB > inputA + 1){
          sum = inputB + inputB - 1;
        }else if(inputA == inputB + 1 || inputB == inputA + 1){
          sum = inputA + inputB;
        }else{
          sum = inputA + inputB;
        } inputB > inputA + 1 inputB inputA + 1 inputA 1 {
          sum = inputB + inputB - 1;
        } sum = inputB + inputB - 1 sum inputB + inputB - 1 inputB + inputB inputB inputB 1 if(inputA == inputB + 1 || inputB == inputA + 1){
          sum = inputA + inputB;
        }else{
          sum = inputA + inputB;
        } inputA == inputB + 1 || inputB == inputA + 1 inputA == inputB + 1 inputA inputB + 1 inputB 1 inputB == inputA + 1 inputB inputA + 1 inputA 1 {
          sum = inputA + inputB;
        } sum = inputA + inputB sum inputA + inputB inputA inputB {
          sum = inputA + inputB;
        } sum = inputA + inputB sum inputA + inputB inputA inputB {
        System.exit(1);
      } System.exit(1) System.exit System 1 {
      System.exit(1);
    } System.exit(1) System.exit System 1 System.out.println(sum) System.out.println System.out System System.out sum scanner.close() scanner.close scanner String[] args args public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int sum = 0;
    int inputA = scanner.nextInt();
    int inputB = scanner.nextInt();
    if(inputA >= 3 && inputB <= 20){
      if(inputB >= 3 && inputB <= 20){
        if(inputA > inputB + 1){
          sum = inputA + inputA - 1;
        }else if(inputB > inputA + 1){
          sum = inputB + inputB - 1;
        }else if(inputA == inputB + 1 || inputB == inputA + 1){
          sum = inputA + inputB;
        }else{
          sum = inputA + inputB;
        }
      }else{
        System.exit(1);
      }
    }else{
      System.exit(1);
    }
    System.out.println(sum);
    scanner.close();
  }
} public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int sum = 0;
    int inputA = scanner.nextInt();
    int inputB = scanner.nextInt();
    if(inputA >= 3 && inputB <= 20){
      if(inputB >= 3 && inputB <= 20){
        if(inputA > inputB + 1){
          sum = inputA + inputA - 1;
        }else if(inputB > inputA + 1){
          sum = inputB + inputB - 1;
        }else if(inputA == inputB + 1 || inputB == inputA + 1){
          sum = inputA + inputB;
        }else{
          sum = inputA + inputB;
        }
      }else{
        System.exit(1);
      }
    }else{
      System.exit(1);
    }
    System.out.println(sum);
    scanner.close();
  }
} Main
import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int sum = 0;
    int inputA = scanner.nextInt();
    int inputB = scanner.nextInt();
    if(inputA >= 3 && inputB <= 20){
      if(inputB >= 3 && inputB <= 20){
        if(inputA > inputB + 1){
          sum = inputA + inputA - 1;
        }else if(inputB > inputA + 1){
          sum = inputB + inputB - 1;
        }else if(inputA == inputB + 1 || inputB == inputA + 1){
          sum = inputA + inputB;
        }else{
          sum = inputA + inputB;
        }
      }else{
        System.exit(1);
      }
    }else{
      System.exit(1);
    }
    System.out.println(sum);
    scanner.close();
  }
}
