#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define u unsigned
#define ull unsigned long long
#define ld long double
#define pb push_back
#define fasterInOut ios::sync_with_stdio(false); cin.tie(0);
#define pi acos(-1)
#define f(i,a,b) for(int i=(a);i<=(b);i++)
#define fr(i,a,b) for(int i=(a);i>=(b);i--)
#define MAX 1000000
int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    if(a==b)
    {
        cout<<c;
    }
    else if(a==c)
    {
        cout<<b;
    }
    else if(b==c)
    {
        cout<<a;
    }
    else if(a==b && b!=c)
    {
        cout<<a;
    }
    else
    {
        cout<<0;
    }
    return 0;
}

#include<bits/stdc++.h>

using namespace std;

int main(void){
	int 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;
}

