a, b = map(int, input().split())
ans = (a or b) + (a and b)
print(ans)