def xorSum(arr, n): 
  
    bits = 0
  
    for i in range(n): 
        bits |= arr[i] 
  
    ans = bits * pow(2, n-1) 
  
    return ans 
  
s = input()
arr = list(map(int, s.split()))
size = len(arr) 
print(xorSum(arr, size)) 