#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
#define ld long double
#define ull unsigned long long
#define lcm(a,b) ((a*b)/__gcd(a,b))
#define debug(x) cout << "Debug : " << x << endl;
const double PI = 2 * acos(0.0);
const int MOD = 1000000007;
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;
}
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
solve();
}