n,m,k=map(int,input().split()) d=min(n,m)*2 if n!=m: d-=1 if d