#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long a, b, c, d, e, f, i, j, k;
  cin >> a >> b >> c;
  d = (1LL << 31) + 5;
  if (abs(b - c) % 2 == 0) {
    d = min(d, max(b, c));
  }
  if (abs(a - c) % 2 == 0) {
    d = min(d, max(a, c));
  }
  if (abs(b - a) % 2 == 0) {
    d = min(d, max(b, a));
  }
  if (d == (1LL << 31 + 5))
    cout << "-1";
  else
    cout << d;
  return 0;
}
