import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int a = s.nextInt();
    int b = s.nextInt();

    int c = a+a;
    int d = a+b;
    int e = b+b;

    int[] f ={c,d,e};
    int max = f[0];
    for(int i = 0;i < f.length; i++){
      max = Math.max(max,f[i]);
    }
    if(c == d && c == e){
    System.out.println(max);
  }else{
    System.out.println(max -1);
  }
  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int a = s.nextInt();
    int b = s.nextInt();

    int c = a+a;
    int d = a+b;
    int e = b+b;

    int[] f ={c,d,e};
    int max = f[0];
    for(int i = 0;i < f.length; i++){
      max = Math.max(max,f[i]);
    }
    if(c == d && c == e){
    System.out.println(max);
  }else{
    System.out.println(max -1);
  }
  }
} Main public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int a = s.nextInt();
    int b = s.nextInt();

    int c = a+a;
    int d = a+b;
    int e = b+b;

    int[] f ={c,d,e};
    int max = f[0];
    for(int i = 0;i < f.length; i++){
      max = Math.max(max,f[i]);
    }
    if(c == d && c == e){
    System.out.println(max);
  }else{
    System.out.println(max -1);
  }
  } main {
    Scanner s = new Scanner(System.in);
    int a = s.nextInt();
    int b = s.nextInt();

    int c = a+a;
    int d = a+b;
    int e = b+b;

    int[] f ={c,d,e};
    int max = f[0];
    for(int i = 0;i < f.length; i++){
      max = Math.max(max,f[i]);
    }
    if(c == d && c == e){
    System.out.println(max);
  }else{
    System.out.println(max -1);
  }
  } Scanner s = new Scanner(System.in); s new Scanner(System.in) int a = s.nextInt(); a s.nextInt() s.nextInt s int b = s.nextInt(); b s.nextInt() s.nextInt s int c = a+a; c a+a a a int d = a+b; d a+b a b int e = b+b; e b+b b b int[] f ={c,d,e}; f {c,d,e} c d e int max = f[0]; max f[0] f 0 for(int i = 0;i < f.length; i++){
      max = Math.max(max,f[i]);
    } int i = 0; int i = 0; i 0 i < f.length i f.length f f.length i++ i++ i {
      max = Math.max(max,f[i]);
    } {
      max = Math.max(max,f[i]);
    } max = Math.max(max,f[i]) max Math.max(max,f[i]) Math.max Math max f[i] f i if(c == d && c == e){
    System.out.println(max);
  }else{
    System.out.println(max -1);
  } c == d && c == e c == d c d c == e c e {
    System.out.println(max);
  } System.out.println(max) System.out.println System.out System System.out max {
    System.out.println(max -1);
  } System.out.println(max -1) System.out.println System.out System System.out max -1 max 1 String[] args args public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int a = s.nextInt();
    int b = s.nextInt();

    int c = a+a;
    int d = a+b;
    int e = b+b;

    int[] f ={c,d,e};
    int max = f[0];
    for(int i = 0;i < f.length; i++){
      max = Math.max(max,f[i]);
    }
    if(c == d && c == e){
    System.out.println(max);
  }else{
    System.out.println(max -1);
  }
  }
} public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int a = s.nextInt();
    int b = s.nextInt();

    int c = a+a;
    int d = a+b;
    int e = b+b;

    int[] f ={c,d,e};
    int max = f[0];
    for(int i = 0;i < f.length; i++){
      max = Math.max(max,f[i]);
    }
    if(c == d && c == e){
    System.out.println(max);
  }else{
    System.out.println(max -1);
  }
  }
} Main
import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int a = s.nextInt();
    int b = s.nextInt();

    int c = a+a;
    int d = a+b;
    int e = b+b;

    int[] f ={c,d,e};
    int max = f[0];
    for(int i = 0;i < f.length; i++){
      max = Math.max(max,f[i]);
    }
    if(c == d && c == e){
    System.out.println(max);
  }else{
    System.out.println(max -1);
  }
  }
}
