#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
void ran() { srand(chrono::steady_clock::now().time_since_epoch().count()); }
long long get_rand() {
  long long a = rand();
  long long b = rand();
  return a * (RAND_MAX + 1ll) + b;
}
signed main() {
  ran();
  fast();
  long long arr[3];
  for (long long i = 0; i < 3; i++) cin >> arr[i];
  sort(arr, arr + 3);
  if (arr[1] % 2 == arr[0] % 2)
    cout << arr[1] << endl;
  else
    cout << arr[2] << endl;
}
