#include <bits/stdc++.h>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder
using ll = long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<long long>;
using vvl = vector<vector<long long>>;
#define rep(i, s, n) for (int i = (int)s; i < (int)n; i++)
#define repr(i, n, s) for (int i = (int)n; (int)s < i; i--)
#define len(a) (int)a.size()
#define all(a) a.begin(), a.end()
/* 1次元ベクトルをスペースでつなぎ、改行をつけて出力 vi, vl, list<int>, list<ll>に対応  */
template<class T> void print_elements(T a) {string str = ""; for (auto itr = a.begin(); itr != a.end(); ++itr) \
        {str += to_string(*itr) + ' ';} str.pop_back(); cout << str << endl;}

const int INF32 = 1 << 29;
const long long INF64 = 1LL << 60;
const long long MOD = 1000000009;
const double PI = acos(-1);


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

#include<bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
/*--------------------------Containers------------------------*/
typedef     long long int           ll;
typedef     unsigned long long int  ull;
typedef     vector < int >          vi;
typedef     vector < ll >           vll;
typedef     vector < vll >          vvll;
typedef     pair< int,int >         pi;
typedef     pair< ll, ll >          pll;
typedef     vector< pi >            vpi;
typedef     vector< pll >           vpll;
typedef     map<int,int>            mi;
typedef     map<ll,ll>              mll;
typedef     map<pi,int>             mpi;
typedef     map<pll,ll>             mpll;
/*------------------------------------------------------------*/

/*--------------------------Limits & Constants----------------*/
#define     MAX                 200007
#define     MOD                 int(1e9+7)
#define     INF                 ll(8230219982008199610)
#define     MINF                ll(-8230219982008199610)
#define     IL                  INT_MAX
#define     MIL                 INT_MIN
#define     PI                  2*acos(0.0)
/*------------------------------------------------------------*/

/*--------------------------Macros----------------------------*/
#define     pf                  printf
#define     sc                  scanf
#define     sz(x)               int(x.size())
#define 	sortv(v)  			sort(begin(v), end(v))
#define 	sortrv(v) 			sort(rbegin(v), rend(v))
#define 	all(nums) 			nums.begin(), nums.end()
#define 	allr(nums) 			nums.rbegin(), nums.rend()
#define     pb                  push_back
#define     eb                  emplace_back
#define     mp                  make_pair
#define     ff                  first
#define     ss                  second
#define     mem(a,n)            memset(a, n, sizeof(a) )
#define     gcd(a,b)            __gcd(a,b)
#define     lcm(a,b)            (a*(b/gcd(a,b)))
#define     fori0(n)          for(int i=0; i<n; i++)
#define     fori1(n)          for(int i=1; i<=n; i++)
#define     forj0(n)          for(int j=0; j<n; j++)
#define     forj1(n)          for(int j=1; j<=n; j++)
#define     rev0(n)           for(int i=n-1; i>=0; i--)
#define     rev1(n)           for(int i=n; i>0; i--)    
#define     forit(vec)        for(auto it=vec.begin();it!=vec.end();it++)
#define     forx(vec)         for(auto x:vec)
/*------------------------------------------------------------*/

/*--------------------------Debugging------------------------*/
#define ___debug(a, b, c) cout << a << " " << b << " " << c << "\n"
#define __debug(a, b) cout << a << " " << b << "\n"
#define _debug(a) cout << a << "\n"
template <typename T>
void print(vector<T> v) { for (T &i : v) cout << i << " "; cout << "\n";}
template <typename T>
void read(vector<T> &v) { for (T &i : v) cin >> i; }
/*------------------------------------------------------------*/

void solve() {
    int a, b, c;
    cin >> a >> b >> c;

    if (a == b) {
        _debug(c);
    }
    else if (a == c) {
        _debug(b);
    }
    else if (b == c) {
        _debug(a);
    }
    else {
        _debug(0);
    }
}

int main() {
    IOS;
 
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    int tcs = 1;
    // cin >> tcs;
    while (tcs--)
        solve();
 
    return 0;
}
 
 
//g++ -std=c++17 cf.cpp -o a.exe