#include<cstdio>
#include<vector>
#include<algorithm>
#include<iostream>
#include<stack>
#include<queue>
#include<string>
using namespace std;

const int INF = 1000000001;

typedef pair<int, int> P;
typedef long long ll;

int main(){
    int a, b, c;
    cin >> a >> b >> c;
    if (a == b) cout << c << endl;
    else if (a == c) cout << b << endl;
    else if (b == c) cout << a << endl;
    else cout << 0 << endl;
}
#include <bits/stdc++.h>

#define crap ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define db1(x) cout<<#x<<"="<<x<<'\n'
#define db2(x,y) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<'\n'
#define db3(x,y,z) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<","<<#z<<"="<<z<<'\n'
#define rep(i,n) for(ll i=0;i<(n);++i)
#define repA(i,a,n) for(ll i=a;i<=(n);++i)
#define repD(i,a,n) for(ll i=a;i>=(n);--i)
#define repV(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define pb push_back
// #define mp make_pair
#define F first
#define S second
#define CN cout<<"NO\n"
#define CY cout<<"YES\n"
#define M_PI  3.14159265358979323846

using namespace std;
using ll = long long;
#define MAXN 10000001
#define mod 1000000007

void solve(){
    ll a,b,c; cin>>a>>b>>c;
    if(a==b) {
        cout<<c;return;
    }
    if(c==b) {
        cout<<a;return;
    }
    if(a==c) {
        cout<<b;return;
    }
    cout<<"0";
    
}
int main()
{
    crap;
    #ifndef ONLINE_JUDGE
        freopen("input.txt","r", stdin) ;
        freopen("output.txt","w", stdout) ;
        freopen("error.txt","w", stderr) ;
    #endif
    ll t=1; 
    // cin>>t;
    repA(i,1,t){
        // cout<<"Case #"<<i<<": ";
        solve();
    }
    return 0;
}