#include <bits/stdc++.h>
using namespace std;


int main()
{
  int a, b, c;
  cin >> a >> b >> c;
  int ans = 0;
  if (a == b)
    ans = c;
  if (a == c)
    ans = b;
  if (b == c)
    ans = a;
 
  cout << ans << "\n";
}  

#include <iostream>
#include <string.h>
#include <math.h>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <set>
#include <queue>
#include <deque>
#include <map>
#include <stack>
#include <cmath>
#include <stdio.h>
using namespace std;

#define MOD 1000000007
#define MOD2 998244353
#define TEN5 100005
#define TEN6 1000005
#define PI 3.1415926
#define pb(x) push_back(x)
#define ALL(x) x.begin(),x.end()
#define mkpr(x1,x2) make_pair(x1,x2)
#define FOR(i,start,end) for(int i = (start);i < (end);i++)
#define FORE(i,start,end) for(int i = (start);i <= (end);i++)
#define IFOR(i,start,end) for(int i = (start);i > (end);i--)
#define IFORE(i,start,end) for(int i = (start);i >= (end);i--)

#define _debug 1
#if _debug
#endif // _debug

typedef long long int ll;
typedef unsigned long long int ull;

ll num[TEN5];
vector<pair<ll,ll>> vpll;
//__builtin_popcount()  calculate 1's number in n

int main(void)
{
    ll m,n,o;
    cin>>m>>n>>o;

    if(m==n) cout<<o;
    else if(m==o) cout<<n;
    else if(n==o) cout<<m;
    else cout<<0;

    return 0;
}




