#include using namespace std; #include using namespace atcoder; #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) #define P pair #define LP pair #define fi first #define se second #define pb push_back #define eb emplace_back #define all(s) s.begin(), s.end() #define rall(s) s.rbegin(), s.rend() template void chmax(T& a, T b) { a = max(a, b); }; template void chmin(T& a, T b) { a = min(a, b); }; int main() { int a, b, c; cin >> a >> b >> c; if (a == b && b== c) cout << a << endl; else if (a != b && b != c && c != a) cout << 6-(a+b+c) << endl; else if (a == b) cout << c << endl; else if (b == c) cout << a << endl; else if (c == a) cout << b << endl; return 0; }