#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    if(a==b && b==c)
        cout<<a;
    else if(a==b)
        cout<<c;
    else if(b==c)
        cout<<a;
    else if(a==c)
    cout<<b;
    else
        cout<<"0";

}
#include <bits/stdc++.h>
#include <cmath>
#include <list>
#include <algorithm>
#include <stdio.h>

using namespace std;

#define M1 1000000007
const double pi = 3.14159265;
#define ll long long
#define lld long double
#define frf(i,n) for(ll i=0;i<n;i++)
#define pb push_back
#define fi first
#define se second
#define incin(v, n)            \
    for (ll i = 0; i < n;i++){ \
        cin >> v[i];           \
    }
const int mx=1e5+5;
 

int main(){
     ll a,b,c;
     cin>>a>>b>>c;
     if(a==b && a!=c){cout<<c;}
     else if(a==c && a!=b){cout<<b;}
     else if(c==b && a!=c){cout<<a;}
     else if(a==c && a==b){cout<<a;}
     else{cout<<0;}
    return 0;
}