#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MAX 1000000001
#define MOD 1000000007
#define rep(i, n) for (int i = 0; i < n; ++i)

void solve(void)
{
    vector<int> v(3);
    rep(i, 3) cin >> v[i];
    map<int, int> mp;
    rep(i, 3) mp[v[i]]++;
    bool f = false;
    for (auto i : mp)
    {
        if (i.second >= 2)
            f = true;
        if (i.second >= 3)
        {
            cout << i.first << endl;
            return;
        }
    }

    if (f)
        for (auto i : mp)
        {
            if (i.second < 2)
            {
                cout << i.first << endl;
                return;
            }
        }
    else
        cout << 0 << endl;
}

int main(void)
{
    solve();
}
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod 1000000007
#define pb emplace_back
#define desend(x) greater<x>()
#define srt(v) sort(v.begin(),v.end())
#define all(x) x.begin(),x.end()
#define rvs(x) reverse(x.begin(),x.end())
#define Input(x) for(auto &n:x) cin>>n; 
#define Output(x) for(auto &n:x) cout<<n<<" ";cout<<"\n";


ll power(ll x,ll y){//for (x^y)%mod Iterative
    ll ans=1;
    while(y>0){
        ans%=mod;
        if(y&1)ans*=x;
        x=x*x%mod;
        y>>=1;
    }
    return ans%mod;
}

ll fact(ll n){
    ll ans=1;
    for(ll i=1;i<=n;i++){
        ans*=i;
        ans%=mod;
    }
    return ans;
}


void solve(){
    ll a,b,c;
    cin>>a>>b>>c;
    map<ll,ll> ma;
    ma[a]++;
    ma[b]++;
    ma[c]++;
    if(ma.size()==3)cout<<0;
    else {
        if(ma.size()==1)cout<<a;
        else {
            for(auto it:ma)if(it.second==1)cout<<it.first;
        }
    }

    
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    solve();
}