# Enter your code here. Read input from STDIN. Print output to STDOUT s=map(int,raw_input().split()) a=0 b=0 if s[0]>1: a=s[0]-1 else: a=0 if s[1]>0: b=s[1]-1 else: b=0 t=0 t=a+b print (t)