import java.util.*; import java.io.*; public class Main { public static Scanner sc = new Scanner(System.in); public static PrintWriter pw = new PrintWriter(System.out); public static void main(String[] args) { int t = 1; while( t > 0 ) { solve(); t--; } pw.flush(); } static void solve() { int A = sc.nextInt(); int B = sc.nextInt(); int ans = 0; if( A == B ) { ans += 2*A; }else { if( A > B ) { int temp = A; A = B; B = temp; } ans += 2*A+1; B -= A+1; A = 0; ans += 2*B; } pw.println(ans); } }