d=list(map(int,input().split())) a=max(d) b=min(d) if a==b: print(a+b) else: print(b*2+1)