N,M,K=map(int,input().split()) if min(M,N)*2-(M==N)