#include <bits/stdc++.h>
using namespace std;
long long cal(long long a, long long b, long long c) {
  long long ans = 0;
  if (b < c) swap(b, c);
  ans += c;
  b -= c;
  if (b & 1)
    ans = 1000000000000LL;
  else
    ans += b;
  return ans;
}
int main() {
  long long ans = 1000000000000LL, a, b, c;
  cin >> a >> b >> c;
  ans = min(ans, cal(a, b, c));
  ans = min(ans, cal(b, a, c));
  ans = min(ans, cal(c, b, a));
  if (ans == 1000000000000LL)
    cout << -1;
  else
    cout << ans;
  return 0;
}
