inf = 10**18

A,B,C,K = list(map(int,input().split(" ")))

if K % 2 == 1:

	if (B-A) > inf:

		print("Unfair")

	else:

		print((B-A))

else:

	if (A-B) > inf:

		print("Unfair")

	else:

		print((A-B))
A,B,C,K = list(map(int,input().split(" ")))



if K % 2 == 1:

	print((B-A))

else:

	print((A-B))

inf = 10**18
A, B, C, K = list(map(int, input().split(" ")))
if K % 2 == 1:
    if (B - A) > inf:
        print("Unfair")
    else:
        print((B - A))
else:
    if (A - B) > inf:
        print("Unfair")
    else:
        print((A - B))

A, B, C, K = list(map(int, input().split(" ")))
if K % 2 == 1:
    print((B - A))
else:
    print((A - B))

-inf = 10**18 -    if (B - A) > inf: -        print("Unfair") -    else: -        print((B - A)) +    print((B - A)) -    if (A - B) > inf: -        print("Unfair") -    else: -        print((A - B)) +    print((A - B))