#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define PI acos(-1)
#define vi vector<int>
const int kMod = 1e9 + 7;
const int kInf = (~(1 << 31)) / 2 - 500;
const ll kInfL = (~(1LL << 63)) / 2 - 2000;

int main() {
  vector<int> A(3);
  for (int i = 0; i < 3; ++i) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  if (A[0] == A[1]) {
    cout << A[2] << endl;
    return 0;
  } else if (A[1] == A[2]) {
    cout << A[0] << endl;
    return 0;
  }
  cout << 0 << endl;
  return 0;
}

#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
#ifdef TRACE
#include "../trace.h"
#else
#define trace(args...)
#endif
typedef long long ll;
typedef long double ld;
typedef vector<ll> vl;        typedef vector<int> vi;
typedef vector<vl> vvl;          typedef vector<vi> vvi;
typedef pair<ll, ll> pll;    typedef pair<int, int> pii;
typedef vector<pll> vpl;    typedef vector<pii> vpi;
typedef vector<vpl> vvpl;    typedef vector<vpi> vvpi;
#define s second
#define F first
#define v vector
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define pob pop_back
#define pf push_front
#define pof pop_front
#define sz(x) (int)x.size()
#define f(i,j,k,l) for(int i =(int)j; i!=(int)k; i = i + l)
#define inp(v,n) f(i,0,n,1) cin>>v[i];
#define out(v,n) f(i,0,n,1){ cout<<v[i]<<" ";}cout<<endl;
#define endl '\n'
#define all(v) v.begin(), v.end()
const ll mod = 998244353;
bool isPrime(int x) {
    for (int d = 2; d * d <= x; d++) {
        if (x % d == 0)
            return false;
    }
    return true;
}
void solve(){
    int a,b,c;
    cin>>a>>b>>c;
    if(a==b) cout<<c;
    else if(b==c) cout<<a;
    else if(a==c) cout<<b;
    else cout<<0;
}

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int t = 1;
    // cin >> t;
    while (t--) {
        solve();
    }
}