uses math;
var a1, an: real;
i, n: integer;
begin
read(n);
read(a1);
for i := 2 to n - 1 do read();
read(an);
writeln(abs(a1 - an));
end.
uses math;
var a1, an: real;
i, n: integer;
begin
read(n);
read(a1);
for i := 2 to n - 1 do read();
read(an);
writeln(abs(a1 - an));
end.