a=list(map(int,input().split())) a.sort() a[1]-=1 if a[0]!=a[1]: print(min(a)*2+1) else: print(print(min(a)*2))