local n, z, w = io.read("*n", "*n", "*n")
local a = {}
for i = 1, n do a[i] = io.read("*n") end
if n == 1 then
  print(math.abs(w - a[1]))
else
  print(math.max(math.abs(w - a[n]), math.abs(a[n - 1] - a[n])))
end
