n,m=[int(i) for i in input().split()] k=m+n-2 print(k)