You are given 5 integers a,b,c,d,k. Print the maximum value of x+y such that x and y follow these conditions :
a<=x<=b
c<=y<=d
x^y =k
Note : '^' sign denotes the XOR operator.
Constraints :
0<=a<=b<=pow(10,18)
0<=c<=d<=pow(10,18)
0<=k<=pow(10,18)
Note : 'pow(a,b)' denotes a raised to the power b. e.g. pow(a,2) = a squared.