#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

void function(int x);

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("C:/Users/ASUS/Desktop/inout/input.txt", "r", stdin);
    freopen("C:/Users/ASUS/Desktop/inout/output.txt", "w", stdout);
    #endif

    int a,b,c;
    cin>>a>>b>>c;
    if(a==b)
    	cout<<c<<endl;
    else if(b==c)
    	cout<<a<<endl;
    else if(a==c)
    	cout<<b<<endl;
    else if(a==b && b==c)
    	cout<<a<<endl;
    else
    	cout<<"0"<<endl;
    
    return 0;
}
#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<string.h>
#include<memory.h>
#include<vector>
#include<math.h>
using namespace std;
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
        cout<<0;
}
