import java.util.Scanner;
 
public class Main {
  public static void main(String[] args) {
    
    Scanner sc = new Scanner(System.in);
    int num1 = sc.nextInt();
    int num2 = sc.nextInt();
    
    int count = 0;
    
    // 判定&計算
    if(num1 > num2) {
      if(num1 - num2 >= 2) {
        count = num1;
        num1 -= 1;
        count += num1;
      }else{
        count = num1 + num2;
      }
    }else if(num2 > num1){
      if(num2 - num1 >= 2) {
        count = num2;
        num2 -= 1;
        count += num2;
      }else{
        count = num1 + num2;
      }
    }else{
      count = num1 + num2;
    }
      
    // 出力  
    System.out.println(count);
   }
 } import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    
    Scanner sc = new Scanner(System.in);
    int num1 = sc.nextInt();
    int num2 = sc.nextInt();
    
    int count = 0;
    
    // 判定&計算
    if(num1 > num2) {
      if(num1 - num2 >= 2) {
        count = num1;
        num1 -= 1;
        count += num1;
      }else{
        count = num1 + num2;
      }
    }else if(num2 > num1){
      if(num2 - num1 >= 2) {
        count = num2;
        num2 -= 1;
        count += num2;
      }else{
        count = num1 + num2;
      }
    }else{
      count = num1 + num2;
    }
      
    // 出力  
    System.out.println(count);
   }
 } Main public static void main(String[] args) {
    
    Scanner sc = new Scanner(System.in);
    int num1 = sc.nextInt();
    int num2 = sc.nextInt();
    
    int count = 0;
    
    // 判定&計算
    if(num1 > num2) {
      if(num1 - num2 >= 2) {
        count = num1;
        num1 -= 1;
        count += num1;
      }else{
        count = num1 + num2;
      }
    }else if(num2 > num1){
      if(num2 - num1 >= 2) {
        count = num2;
        num2 -= 1;
        count += num2;
      }else{
        count = num1 + num2;
      }
    }else{
      count = num1 + num2;
    }
      
    // 出力  
    System.out.println(count);
   } main {
    
    Scanner sc = new Scanner(System.in);
    int num1 = sc.nextInt();
    int num2 = sc.nextInt();
    
    int count = 0;
    
    // 判定&計算
    if(num1 > num2) {
      if(num1 - num2 >= 2) {
        count = num1;
        num1 -= 1;
        count += num1;
      }else{
        count = num1 + num2;
      }
    }else if(num2 > num1){
      if(num2 - num1 >= 2) {
        count = num2;
        num2 -= 1;
        count += num2;
      }else{
        count = num1 + num2;
      }
    }else{
      count = num1 + num2;
    }
      
    // 出力  
    System.out.println(count);
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num1 = sc.nextInt(); num1 sc.nextInt() sc.nextInt sc int num2 = sc.nextInt(); num2 sc.nextInt() sc.nextInt sc int count = 0; count 0 if(num1 > num2) {
      if(num1 - num2 >= 2) {
        count = num1;
        num1 -= 1;
        count += num1;
      }else{
        count = num1 + num2;
      }
    }else if(num2 > num1){
      if(num2 - num1 >= 2) {
        count = num2;
        num2 -= 1;
        count += num2;
      }else{
        count = num1 + num2;
      }
    }else{
      count = num1 + num2;
    } num1 > num2 num1 num2 {
      if(num1 - num2 >= 2) {
        count = num1;
        num1 -= 1;
        count += num1;
      }else{
        count = num1 + num2;
      }
    } if(num1 - num2 >= 2) {
        count = num1;
        num1 -= 1;
        count += num1;
      }else{
        count = num1 + num2;
      } num1 - num2 >= 2 num1 - num2 num1 num2 2 {
        count = num1;
        num1 -= 1;
        count += num1;
      } count = num1 count num1 num1 -= 1 num1 1 count += num1 count num1 {
        count = num1 + num2;
      } count = num1 + num2 count num1 + num2 num1 num2 if(num2 > num1){
      if(num2 - num1 >= 2) {
        count = num2;
        num2 -= 1;
        count += num2;
      }else{
        count = num1 + num2;
      }
    }else{
      count = num1 + num2;
    } num2 > num1 num2 num1 {
      if(num2 - num1 >= 2) {
        count = num2;
        num2 -= 1;
        count += num2;
      }else{
        count = num1 + num2;
      }
    } if(num2 - num1 >= 2) {
        count = num2;
        num2 -= 1;
        count += num2;
      }else{
        count = num1 + num2;
      } num2 - num1 >= 2 num2 - num1 num2 num1 2 {
        count = num2;
        num2 -= 1;
        count += num2;
      } count = num2 count num2 num2 -= 1 num2 1 count += num2 count num2 {
        count = num1 + num2;
      } count = num1 + num2 count num1 + num2 num1 num2 {
      count = num1 + num2;
    } count = num1 + num2 count num1 + num2 num1 num2 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
  public static void main(String[] args) {
    
    Scanner sc = new Scanner(System.in);
    int num1 = sc.nextInt();
    int num2 = sc.nextInt();
    
    int count = 0;
    
    // 判定&計算
    if(num1 > num2) {
      if(num1 - num2 >= 2) {
        count = num1;
        num1 -= 1;
        count += num1;
      }else{
        count = num1 + num2;
      }
    }else if(num2 > num1){
      if(num2 - num1 >= 2) {
        count = num2;
        num2 -= 1;
        count += num2;
      }else{
        count = num1 + num2;
      }
    }else{
      count = num1 + num2;
    }
      
    // 出力  
    System.out.println(count);
   }
 } public class Main {
  public static void main(String[] args) {
    
    Scanner sc = new Scanner(System.in);
    int num1 = sc.nextInt();
    int num2 = sc.nextInt();
    
    int count = 0;
    
    // 判定&計算
    if(num1 > num2) {
      if(num1 - num2 >= 2) {
        count = num1;
        num1 -= 1;
        count += num1;
      }else{
        count = num1 + num2;
      }
    }else if(num2 > num1){
      if(num2 - num1 >= 2) {
        count = num2;
        num2 -= 1;
        count += num2;
      }else{
        count = num1 + num2;
      }
    }else{
      count = num1 + num2;
    }
      
    // 出力  
    System.out.println(count);
   }
 } Main
import java.util.Scanner;
 
public class Main {
  public static void main(String[] args) {
    
    Scanner sc = new Scanner(System.in);
    int num1 = sc.nextInt();
    int num2 = sc.nextInt();
    
    int count = 0;
    
    // 判定&計算
    if(num1 > num2) {
      if(num1 - num2 >= 2) {
        count = num1;
        num1 -= 1;
        count += num1;
      }else{
        count = num1 + num2;
      }
    }else if(num2 > num1){
      if(num2 - num1 >= 2) {
        count = num2;
        num2 -= 1;
        count += num2;
      }else{
        count = num1 + num2;
      }
    }else{
      count = num1 + num2;
    }
      
    // 出力  
    System.out.println(count);
   }
 }