a = input().split(" ") n = int(a[0]) m = int(a[1]) ans = (n-1)+(m-1) print(ans)