begin
readln(a, b, c, d);
if (a <> b) and (b = c) and (b = d)
then writeln(a)
else if (b <> c) and (a = c) and (a = d)
then writeln(b)
else if (c <> d) and (a = b) and (a = d)
then writeln(c)
else if (c <> d) and (a = b) and (a = c)
then writeln(d)
else writeln('Нет решения');
readln
end.
a, b, c, d: integer;
begin
readln(a, b, c, d);
if (a <> b) and (b = c) and (b = d)
then writeln(a)
else if (b <> c) and (a = c) and (a = d)
then writeln(b)
else if (c <> d) and (a = b) and (a = d)
then writeln(c)
else if (c <> d) and (a = b) and (a = c)
then writeln(d)
else writeln('Нет решения');
readln
end.