#include <bits/stdc++.h>
#define ll long long
using namespace std;
//reverse(s.begin(),s.end())
ll gcd(ll a,ll b){
    ll s=1,c;
    while(a&&b){
        if((~a&1)&&(~b&1))
            a>>=1,b>>=1,s<<=1;
        else if(~a&1)a>>=1;
        else if(~b&1)b>>=1;
        else if(a>b)a=a-b;
        else c=b-a,b=a,a=c;
    }
    if(!a)return b*s;
    if(!b)return a*s;
}
int main(){
	ll n=1;cin>>n;
	ll k;ll ans = 6987268688401;
	cout<<ans;
}

/** これを翻訳している間、あなたはあなたの人生のいくつかの貴重な瞬間を無駄にしました **/
#include<bits/stdc++.h>
using namespace std;

#ifdef Zoro
  #include "headers/debug.h"
#else
  #define debug(x...)
  #define deb(x...)
#endif

#define rep(i,x,y) for(int i=x;i<y;i++)
#define repr(i,x,y) for(int i=x;i>=y;i--)
#define int long long
#define pb push_back
#define ff first
#define ss second
#define sz(x) ((int)x.size())
#define all(x) begin(x), end(x)
#define memo(x,y) memset((x),(y),sizeof((x)))
#define line cout<<"[At "<<__LINE__<<"]"<<endl;

using pii = pair<int, int>;
using vi = vector<int>;
using vii = vector<pair<int, int>>;

constexpr int mod = 1e9 + 7, N = 2e5 + 5;
constexpr long long inf = 1e18;
constexpr long double eps = 1e-6;


void Onigiri() {
  int a[3];
  rep(i,0,3)cin>>a[i];

  sort(a,a+3);
  if(a[0] == a[1] ) cout<<a[2];
  else if(a[1]==a[2]) cout<<a[0];
  else cout<<0;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  //cout.precision(10);cout<<fixed;
#ifdef Zoro
  freopen("/home/pritish/Competitive/io/in", "r", stdin);
  freopen("/home/pritish/Competitive/io/out", "w", stdout);
#endif

  int t = 1;
  //cin >> t;

  while(t--) {
    Onigiri();
    cout << "\n";
  }

  cerr << "\n" << (float)clock() / CLOCKS_PER_SEC * 1000 << " ms" << endl;
  return 0;
}