#define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <functional>
#include <array>
#include <algorithm>
#include <iomanip>

using namespace std;

int main()
{
	int a, b, c;

	int total = 0;

	cin >> a >> b >> c;

	if (a == b)
	{
		cout << c;
	}
	else if (a == c)
	{
		cout << b;
	}
	else if (b == c)
	{
		cout << a;
	}
	else
	{
		cout << total;
	}
	
	return 0;
}
#include<bits/stdc++.h>
#define llu unsigned long long int 
#define ll long long 
#define l1 int
#define u_m unordered_map
#define M map
#define sort1(s) sort(s.begin(),s.end())
#define pb(x) push_back(x)
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define answer cout<<ans<<endl;
#define Sum cout<<sum<<endl;
#define P1(a) cout<<a<<endl;
#define P2(a,b) cout<<a<<" "<<b<<endl;
#define P3(a,b,c) cout<<a<<" "<<b<<" "<<c<<endl;
#define forn(i, n) for (int i = 0; i < int(n); i++)

using namespace std;

// vector<vector<int>> v(101,vector<int>());
// vector<bool> b(101,false);
// vector<int> ans(101);
 
ll power(ll x, ll y , ll mod)  
{  
    ll res = 1;        
    while (y > 0)  
    {  
        if (y & 1)  
            res = (res*x)%mod;  
        y = y/2;  
        x = (x*x)%mod;
    }  
    return res%mod;  
}
void bfs(vector<vector<l1>> v,int s,int x,set<int> &ans)
{
	int i;
	if(x==0)
	{
		ans.insert(s);
		return;
	}
	for(i=0;i<v[s].size();i++)
	{
		bfs(v,v[s][i],x-1,ans);
	}
	return;
}

/*
ll prime(ll n)
{
    ll mx=n+1;//cout<<mx<<endl;
    for(ll i=2;i*i<=n;i++)
    {
        if(n%i==0 && n/i!=i)
        {
            mx=min(mx,(n/i) + i);
            //cout<<mx<<endl;
        }
    }
    return mx;
}
ll modinv(ll x)
{
    return power(x,mod-2)%mod;    
}
void swap(ll *xp, ll *yp) 
{ 
    ll temp = *xp; 
    *xp = *yp; 
    *yp = temp; 
}
void print(vector<ll> v)
{
    ll i,j,n=v.size();
    for(i=0;i<n;i++)
    {
        cout<<v[i]<<" ";
    }
    cout<<endl;
}
bool sortcol( const vector<int>& v1, 
               const vector<int>& v2 ) { 
 return v1[1] < v2[1]; 
} 
 
bool sortcol1( const vector<int>& v1, 
               const vector<int>& v2 ) { 
 return v1[0] < v2[0]; 
}

ll gcd(ll a, ll b) 
{ 
    if (b == 0) 
        return a; 
    return gcd(b, a % b);  
}
ll lcm(ll a,ll b)
{
    return (a*b)/gcd(a,b);
}
*/ 

// C++ program to split an array into Two
// equal sum subarrays
/*
bool partition (int arr[], int n)
{
	int sum = 0;
	int i, j;

	for (i = 0; i < n; i++)
	sum += arr[i];

	if (sum % 2 != 0)
	return false;

	bool part[n + 1][sum / 2 + 1];

	// initialize top row as false
	for (i = 0; i <= sum/2; i++)
        part[0][i] = false;

	// initialize leftmost column as true
	for (i = 0; i <= n; i++)
	part[i][0] = true;

	// Fill the partition table in botton up manner
	for (i = 1; i <= n; i++)
	{
		for (j = 1; j <= sum/2; j++)
		{
			part[i][j] = part[i-1][j];
			if (j >= arr[i - 1])
			part[i][j] = part[i][j] ||
						part[i - 1][j - arr[i -1]];

		}
	}

	return part[n][sum/2];
} */

void scan(vector<ll> &v,ll n)
{
    for(ll i=0;i<n;i++)
    cin>>v[i];
}

void sol()
{
	ll a,b,c;
	cin>>a>>b>>c;
	if(a==b)
	{
		P1(c);
	}
	else if(a==c)
	{
		P1(b);
	}
	else if(b==c)
	{
		P1(a);
	}
	else
	{
		P1(0);
	}
	//cout<<endl;
}

int main()
{
	ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
	l1 t=1;
	//cin>>t;
	while(t--)
	{
		sol();
	}
	return 0;
}
