#include <bits/stdc++.h>
#include <unordered_set>
#include <algorithm>
 
using namespace std;
 
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vll = vector<ll>;
using vs = vector<string>;
 
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repll(i,n) for (ll i = 0; i < (ll)(n); i++)
#define fore(x,a) for(auto&(x) : (a))
 
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
 
#define ALL(a) (a).begin(), (a).end()
 
const ll INFL = 1e18;
const int INFI = 1e9;
const int MOD = 1e9 + 7;
 
int main(){
  vi A(3);
  rep(i,3) {
    cin >> A[i];
  }
  sort(ALL(A));
  if(A[0] == A[1]) {
    cout << A[2] << endl;
  }
  else if(A[1] == A[2]) {
    cout << A[0] << endl;
  }
  else {
    cout << 0 << endl;
  }
}
#include <bits/stdc++.h>

using namespace std;    
// ---------------------------------------------------------Defines----------------------------------------------------------
#define fast_cin         ios_base::sync_with_stdio(0); cin.tie(NULL); cerr.tie(NULL);
#define sz(a)            (int)a.size()
#define pb(a)            push_back(a)
#define all(a)           a.begin(),a.end()
#define gcd(a, b)        __gcd(a, b)
#define lcm(a, b)        ((a)*((b)/gcd(a,b)))
#define endl             "\n"
//-----------------------------------------------------------Types-----------------------------------------------------------
typedef long long ll;
typedef double db;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii>vii;
typedef vector<pll>vll;

#define dbg(x) cerr << #x << ": " << x << endl;
#define DBG    cerr << __LINE__ << ": I GOT STUCK\n";
//---------------------------------------------------------------------------------------------------------------------------------------


void solve(){
    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;

}

int main() {
    // freopen("billboard.in","r", stdin);
    // freopen("billboard.out","w", stdout);
    fast_cin;
    cout << fixed; 
    // int tc = 1;
    // int test;cin >> test;
    int test;test=1;   
    while (test--) {
        // cout << "Case " << tc++ << ": ";    
        solve();
    }
    return 0;
}
 