#include<bits/stdc++.h>
using namespace std;
# define ll long long
# define read read1<ll>()
# define Type template<typename T>
Type T read1(){
	T t=0;
	char k;
	bool vis=0;
	do (k=getchar())=='-'&&(vis=1);while('0'>k||k>'9');
	while('0'<=k&&k<='9')t=(t<<3)+(t<<1)+(k^'0'),k=getchar();
	return vis?-t:t;
}
# define fre(k) freopen(k".in","r",stdin);freopen(k".out","w",stdout)
int main(){
	int x=read,y=read,z=read;
	if(x==y||y==z||x==z)printf("%d",x^y^z);
	else puts("0"); 
	return 0;
}
#include<bits/stdc++.h>
using namespace std;

#define ll long long 
#define rep(i,a,n) for(int i=a;i<n;i++)
#define fastin  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
#define mk make_pair


int main(){
  fastin
  int a,b,c;
  cin>>a>>b>>c;
  if(a==b){
    cout<<c<<endl;
  }
  else if(a==c)
  cout<<b<<endl;
  else if(b==c)
  cout<<a<<endl;
  else 
  cout<<"0"<<endl;
  return 0;
}