import java.util.*; import java.lang.*; import java.io.*; class Main { public static void main (String[] args) { // 入力値の読み込み Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int sabun = Math.abs(a-b); if(sabun <= 1){ System.out.println(a+b-1); }else{ System.out.println(a+b-sabun); } } }