import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    resolve(System.in, System.out);
  }

  static void resolve(InputStream is, PrintStream pw) {
    Scanner sc = new Scanner(is);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    int answer = 0;
    int push = 2;
    for (int i = 0; i < push; i++) {
      if (a > b) {
        answer += a;
        a--;
      } else {
        answer += b;
        b--;
      }
    }
    pw.println(answer);
  }
} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {
    resolve(System.in, System.out);
  }

  static void resolve(InputStream is, PrintStream pw) {
    Scanner sc = new Scanner(is);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    int answer = 0;
    int push = 2;
    for (int i = 0; i < push; i++) {
      if (a > b) {
        answer += a;
        a--;
      } else {
        answer += b;
        b--;
      }
    }
    pw.println(answer);
  }
} Main public static void main(String[] args) {
    resolve(System.in, System.out);
  } main {
    resolve(System.in, System.out);
  } resolve(System.in, System.out) resolve System.in System System.in System.out System System.out String[] args args static void resolve(InputStream is, PrintStream pw) {
    Scanner sc = new Scanner(is);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    int answer = 0;
    int push = 2;
    for (int i = 0; i < push; i++) {
      if (a > b) {
        answer += a;
        a--;
      } else {
        answer += b;
        b--;
      }
    }
    pw.println(answer);
  } resolve {
    Scanner sc = new Scanner(is);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    int answer = 0;
    int push = 2;
    for (int i = 0; i < push; i++) {
      if (a > b) {
        answer += a;
        a--;
      } else {
        answer += b;
        b--;
      }
    }
    pw.println(answer);
  } Scanner sc = new Scanner(is); sc new Scanner(is) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int answer = 0; answer 0 int push = 2; push 2 for (int i = 0; i < push; i++) {
      if (a > b) {
        answer += a;
        a--;
      } else {
        answer += b;
        b--;
      }
    } int i = 0; int i = 0; i 0 i < push i push i++ i++ i {
      if (a > b) {
        answer += a;
        a--;
      } else {
        answer += b;
        b--;
      }
    } {
      if (a > b) {
        answer += a;
        a--;
      } else {
        answer += b;
        b--;
      }
    } if (a > b) {
        answer += a;
        a--;
      } else {
        answer += b;
        b--;
      } a > b a b {
        answer += a;
        a--;
      } answer += a answer a a-- a {
        answer += b;
        b--;
      } answer += b answer b b-- b pw.println(answer) pw.println pw answer InputStream is is PrintStream pw pw public class Main {

  public static void main(String[] args) {
    resolve(System.in, System.out);
  }

  static void resolve(InputStream is, PrintStream pw) {
    Scanner sc = new Scanner(is);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    int answer = 0;
    int push = 2;
    for (int i = 0; i < push; i++) {
      if (a > b) {
        answer += a;
        a--;
      } else {
        answer += b;
        b--;
      }
    }
    pw.println(answer);
  }
} public class Main {

  public static void main(String[] args) {
    resolve(System.in, System.out);
  }

  static void resolve(InputStream is, PrintStream pw) {
    Scanner sc = new Scanner(is);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    int answer = 0;
    int push = 2;
    for (int i = 0; i < push; i++) {
      if (a > b) {
        answer += a;
        a--;
      } else {
        answer += b;
        b--;
      }
    }
    pw.println(answer);
  }
} Main
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    resolve(System.in, System.out);
  }

  static void resolve(InputStream is, PrintStream pw) {
    Scanner sc = new Scanner(is);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    int answer = 0;
    int push = 2;
    for (int i = 0; i < push; i++) {
      if (a > b) {
        answer += a;
        a--;
      } else {
        answer += b;
        b--;
      }
    }
    pw.println(answer);
  }
}
