#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int c[3];
  long long int ans = 200000000000000000LL;
  cin >> c[0] >> c[1] >> c[2];
  sort(c, c + 3);
  if ((c[1] - c[0]) % 2 == 0) {
    ans = min(ans, c[1]);
  }
  if ((c[2] - c[0]) % 2 == 0) {
    ans = min(ans, c[2]);
  }
  if ((c[2] - c[1]) % 2 == 0) {
    ans = min(ans, c[2]);
  }
  if (ans == 200000000000000000LL)
    cout << -1 << endl;
  else
    cout << ans << endl;
}
