#include <iostream>

#include <map>
#include <set>
#include <list>
#include <cmath>
#include <deque>
#include <stack>
#include <queue>
#include <array>
#include <bitset>
#include <cstdio>
#include <string>
#include <vector>
#include <random>
#include <chrono>
#include <utility>
#include <numeric>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <sstream>
#include <assert.h>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <unordered_map>

using namespace std;
struct _ { ios_base::Init i; _() { ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); } } _;

#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c> {i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef HOME
	~debug() { cerr << endl; }
	eni( != ) cerr << boolalpha << i; ris;
}
eni( == ) ris << range(begin(i), end(i));
}
sim, class b dor(pair < b, c > d) {
	ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
	*this << "[";
	for (auto it = d.b; it != d.e; ++it)
		*this << ", " + 2 * (it == d.b) << *it;
	ris << "]";
}
#else
	sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "


#define ff first
#define ss second
#define REP(i,st,en) for (int i = st; i <= en; i++)
#define REPR(i,st,en) for (int i = st; i >= en; i--)

const int MOD = 1e9 + 7;

class MainClass {
public:

	void solve() {

		map<int, int> freq;
		int a, b, c; cin >> a >> b >> c;
		freq[a]++, freq[b]++, freq[c]++;

		if ((freq.size() == 3)) cout << 0;
		else {
			if (freq[a] == 1) cout << a;
			else if (freq[b] == 1) cout << b;
			else cout << c;
		}

		return;
	}
};

int main() {

	int test = 1; //cin >> test;
	for (int tst = 1; tst <= test; ++tst) {
		MainClass Ausmosian;

		Ausmosian.solve();
		cout << "\n";
	}

	return 0;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)


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