a, b, c, k = list(map(int, input().split()))

if k%2==0:

    if b-a < 10**18:

        print((a-b))

    else:

        print("Unfair")

else:

    if a-b < 10**18:

        print((b-a))

    else:

        print("Unfair")
a,b,_c,k=list(map(int,input().split()))

if k%2==0:print((a-b))

else:print((b-a))
a, b, c, k = list(map(int, input().split()))
if k % 2 == 0:
    if b - a < 10**18:
        print((a - b))
    else:
        print("Unfair")
else:
    if a - b < 10**18:
        print((b - a))
    else:
        print("Unfair")

a, b, _c, k = list(map(int, input().split()))
if k % 2 == 0:
    print((a - b))
else:
    print((b - a))

-a, b, c, k = list(map(int, input().split())) +a, b, _c, k = list(map(int, input().split())) -    if b - a < 10**18: -        print((a - b)) -    else: -        print("Unfair") +    print((a - b)) -    if a - b < 10**18: -        print((b - a)) -    else: -        print("Unfair") +    print((b - a))