a, b, c = map(int, input().split()) if a == b == c: ans = a elif a != b and b != c and c != a: ans = 0^1^2^3^a^b^c else: ans = a^b^c print(ans)