#include<bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define endl '\n'
#define ff first
#define ss second
#define debug cout<<"HERE"<<endl
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void edm()
{
ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
#ifndef ONLINE_JUDGE
freopen("input.txt","r",stdin);
freopen("outputtt.txt","w",stdout);
#endif
}
void solve()
{
int x,y,z;cin>>x>>y>>z;
int v1 = x%2;
int v2 = y%2;
int v3 = z%2;
if(v1==v2)
{
cout<<z<<endl;
}
else if(v1==v3)
{
cout<<y<<endl;
}
else
{
cout<<z<<endl;
}
}
int32_t main()
{
//edm();
int t = 1;
// cin>>t;
for(int i=1;i<=t;i++)
{
// cout<<"Case "<<i<<": ";
solve();
}
}