#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  int a, b, c;
  cin >> a >> b >> c;
  if ( a == b )
    cout << c << endl;
  else if ( b == c )
    cout << a << endl;
  else if ( c == a )
    cout << b << endl;
  else
    cout << 0 << endl;
}

#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; (i) < (int)(n); ++(i))
#define REP3(i, m, n) for (int i = (m); (i) < (int)(n); ++(i))
#define REP_R(i, n) for (int i = (int)(n)-1; (i) >= 0; --(i))
#define REP3R(i, m, n) for (int i = (int)(n)-1; (i) >= (int)(m); --(i))
#define ALL(x) ::std::begin(x), ::std::end(x)
#define SZ(x) ((int)(x).size())
#define YESNO(bool)            \
    if (bool) {                \
        cout << "YES" << endl; \
    } else {                   \
        cout << "NO" << endl;  \
    }
#define yesno(bool)            \
    if (bool) {                \
        cout << "yes" << endl; \
    } else {                   \
        cout << "no" << endl;  \
    }
#define YesNo(bool)            \
    if (bool) {                \
        cout << "Yes" << endl; \
    } else {                   \
        cout << "No" << endl;  \
    }
#define endl "\n"
#define pb push_back
#define mp make_pair
#define ft first
#define sd second
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vll = vector<long long>;
using vvi = vector<vi>;
using vvll = vector<vll>;
using vs = vector<string>;
using pii = pair<int, int>;
template <class T>
bool chmax(T &a, const T &b) {
    if (a < b) {
        a = b;
        return true;
    } else
        return false;
}
template <class T>
bool chmin(T &a, const T &b) {
    if (b < a) {
        a = b;
        return true;
    } else
        return false;
}
template <typename T>
inline void print(const T &x) {
    cout << x << "\n";
}
template <typename T>
inline void print(const vector<T> &v, string s = " ") {
    REP (i, v.size())
        cout << v[i] << (i != (ll)v.size() - 1 ? s : "\n");
}
const int IINF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;

ll solve(ll a, ll b, ll c) {
    // TODO: edit here
    if (a == b) return c;
    if (b == c) return a;
    if (c == a) return b;
    return 0;
}

// generated by oj-template v4.7.2 (https://github.com/online-judge-tools/template-generator)
int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    ll a, b, c;
    cin >> a >> b >> c;
    auto ans = solve(a, b, c);
    cout << ans << endl;
    return 0;
}
