a, b, c = io.read("*n", "*n", "*n") if a == b and b == c then print(a) elseif a ~= b and a ~= c and b ~= c then print(6 - a - b - c) else if a == b then print(c) elseif b == c then print(a) else print(b) end end