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



int main()
{
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	ll 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;
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, a, b) for (int i = a; i >= b; i--)

int main() {
    int a, b, c;
    cin >> a >> b >> c;
    set<int> set;
    set.insert(a);
    set.insert(b);
    set.insert(c);
    if (set.size() == 3)
        cout << 0 << endl;
    else {
        if (a == b)
            cout << c << endl;
        else if (a == c)
            cout << b << endl;
        else
            cout << a << endl;
    }
}
