#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define debug cout<<"check"<<endl;cout.flush();
#define all(x) (x).begin(),(x).end()
#define endl '\n'
const ll N=200005;
const ll mod=1000000007;
const ll INF=2e18L+5;
void solve(){
ll a,b,c;
cin>>a>>b>>c;
if(a%2==b%2)cout<<c<<endl;
else
if(a%2==c%2)cout<<b<<endl;
else cout<<a<<endl;
}
int32_t main(){
ios::sync_with_stdio(false);cin.tie(nullptr);
int t=1;
//cin>>t;
for(int i=1;i<=t;i++){
solve();
}
return 0;
}