#include<iostream>
using namespace std;
int main()
{
    int x1,x2,x3;
    cin>>x1>>x2>>x3;
    if(x1== x2)
    {
        cout<<x3;
    }
    else if(x1==x3)
    {
        cout<<x2;
    }
    else if(x2==x3)
    {
        cout<<x1;
    }
    else
    {
        cout<< 0;
    }

}
#include<bits/stdc++.h>
#define ll long long
#define re register
#define INF 2147483647
using namespace std;

inline int read()
{
	int f=1,x=0;char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-') f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=x*10+s-48;
		s=getchar();
	}
	return f*x;
}

int main()
{
	int a=read(),b=read(),c=read();
	int sum=a+b+c;
	if(a==b||a==c)
	{
		printf("%d\n",sum-2*a);
		return 0;
	}
	if(b==c)
	{
		printf("%d\n",sum-2*b);
		return 0;
	}
	cout<<0<<endl;
	return 0;
}