#include <bits/stdc++.h>
using namespace std;
long long func(long long a, long long b, long long c) {
  if (a % 2 != b % 2) return (1ll << 60);
  long long x = min(a + c, b + c);
  return a + b + c - x;
}
int main(void) {
  int i;
  long long a, b, c;
  cin >> a >> b >> c;
  long long ans = (1ll << 60);
  ans = min(ans, func(a, b, c));
  ans = min(ans, func(b, c, a));
  ans = min(ans, func(c, a, b));
  if (ans == (1ll << 60)) return -1;
  cout << ans << endl;
  return 0;
}
