x,y,z=map(int,input().split()) if x>y:x,y=y,x print(x+z if x+z>1)