#include <bits/stdc++.h>
using namespace std;
long long arr[5];
int main() {
  cin >> arr[0] >> arr[1] >> arr[2];
  sort(arr, arr + 3);
  if ((arr[1] - arr[0]) % 2 == 0) {
    cout << arr[1] << endl;
  } else
    cout << arr[2] << endl;
}
