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