# coding: utf-8 a,b = gets.split(' ').map{|s|s.to_i} if a > b then a, b = b, a end ans = 2 * a if b == a then ans -= 1 end p ans