#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
inline ll read(){
	ll x=0,f=1;
	char c=getchar();
	while(c<'0'||c>'9'){
		if(c=='-')f=-1;
		c=getchar();
	}
	while(c>='0'&&c<='9'){
		x=(x<<1)+(x<<3)+c-'0';
		c=getchar();
	}
	return x*f;
}
string s;
int main(){
	cin>>s;
	for(int i=0;i<=20;++i){
		string t=s;
		reverse(t.begin(),t.end());
		if(s==t){
			printf("Yes\n");
			return 0;
		}
		s='0'+s;
	}
	printf("No\n");
	return 0;
}


/////keep going!~!one day u will get there
#include<bits/stdc++.h>
#define ll        	long long
#define pb        	push_back
#define ppb    	  	pop_back
#define pii         pair<ll int,ll int>
#define vi   	  	vector<ll>
#define YES  	  	cout<<"YES"<<endl;
#define NO   	  	cout<<"NO"<<endl;
#define all(a)    	(a).begin(),(a).end()
#define uniq(v)   	(v).erase(all(v),(v).end())
#define rep(i,a,b)	 for(int i=a;i<b;i++)
#define repo(i,a,b) for(int i=a;i>=b;i--)
#define fi      first
#define se      second
#define endl    '\n'
const ll int maxn=1e17+1;
const ll mod=998244353;
using namespace std;
//powerer function
long long int power(long long int a,long long int b)
{long long int res = 1;
        while(b>0){
                if(b%2==1) res = res * a;
                a = a*a;
                b = b/2;
        }
        return res;	
}
//modular inverse
 ll po( ll x, ll y){ ll res=1;x=x%mod;while(y>0){if(y&1)res=((res%mod)*(x%mod))%mod;y=y>>1;x=((x%mod)*(x%mod))%mod;}return res;}

int main()
{ ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t=1;
  //cin>>t;
  while(t--)
  {  
     vi a(3);
     for(int i=0;i<3;i++)
     cin>>a[i];
     sort(all(a));
     if(a[0]==a[1])
     cout<<a[2]<<endl;
     else if(a[1]==a[2])
     cout<<a[0]<<endl;
     else
     cout<<"0"<<endl;
	   
  }
}
