#include using namespace std; using ll = long long; using P = pair; #define rep(i, a, b) for(long long i = (a); i < (b); ++i) #define rrep(i, a, b) for(long long i = (a); i >= (b); --i) constexpr long long inf = 4e18; struct SetupIO { SetupIO() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(30); } } setup_io; int main(void) { int a, b, c; cin >> a >> b >> c; if(a == b and b == c) { cout << a << '\n'; } else if(a != b and b != c and c != a) { cout << 6 - a - b - c << '\n'; } else { cout << (a xor b xor c) << '\n'; } }