#include <iostream>
#include <vector>
#include <bits/stdc++.h>
#define ll long long
using namespace std;

//take care of long long

//fast I/O 
auto optimizer = []() {  // makes I/O fast
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  return 0;
}();

int main() {
	ll t=1;
	//cin>>t;
	while(t--)
	{
	    ll a,b,c;
	    cin>>a>>b>>c;
	    
	    if(a==b)
	        cout<<c<<endl;
	    else if(b==c)
	        cout<<a<<endl;
	    else if(c==a)
	        cout<<b<<endl;
	    else
	        cout<<0<<endl;
	    
	}
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define M (int)(1e9 + 7)

int ar[100005][26];
int N;
int sum(int r, int l)
{
    int res[26] = {0};
    for (; r > 0; r -= (r & -r))
    {
        for (int j = 0; j < 26; j++)
        {
            res[j] += ar[r][j];
        }
    }
    int res1[26] = {0};
    for (; l > 0; l -= (l & -l))
    {
        for (int j = 0; j < 26; j++)
        {
            res1[j] += ar[l][j];
        }
    }
    int count = 0;
    for (int i = 0; i < 26; i++)
    {
        if (res[i] - res1[i] > 0)
        {
            count++;
        }
    }
    return count;
}
void update(int val, int i, int num)
{
    for (; i <= N; i += (i & -i))
    {
        ar[i][val]++;
        if (num > -1)
        {
            ar[i][num]--;
        }
    }
}
bool rounder(int n)
{
    if (n == 3 || n == 4 || n == 5 || n == 6)
        return true;
    else
        return false;
}
int solve()
{

    int a,b,c;
    cin >> a >> b >> c;
    if(a==b)
    {
        return c;
    }
    else if(b==c)
    {
        return a;
    }
    else if(a==c)
    {
        return b;
    }
    else return 0;
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    // int t;
    // cin >> t;
    // while (t--)
    // {
    //     cout << solve()<<"\n";
    // }
    //cout << __gcd(69,138);
    cout << solve() << "\n";
}