#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1111111;
const long long INF = 0x7FFFFFFFFFFFFFFFLL;
string s;
map<pair<pair<int, int>, int>, long long> mpp;
long long get(long long a, long long b, long long c) {
  pair<pair<int, int>, int> p = make_pair(make_pair(a, b), c);
  if (mpp.find(p) != mpp.end()) return mpp[p];
  if (a + b == 0 || b + c == 0 || a + c == 0) return 0;
  int ma = min(a, b);
  int mb = min(a, c);
  int mc = min(b, c);
  long long aa = INF, bb = INF, cc = INF;
  if (ma) aa = get(a - ma, b - ma, c + ma) + ma;
  if (mb) bb = get(a - mb, b + mb, c - mb) + mb;
  if (mc) cc = get(a + mc, b - mc, c - mc) + mc;
  long long ret = min(min(aa, bb), cc);
  if ((b + c) % 2 == 0) {
    long long v = max(b, c) - (b + c) / 2;
    if (a >= v) {
      if (b > c) {
        ret = min(ret, get(a - v, b - v, c + v) + v);
      } else if (b < c) {
        ret = min(ret, get(a - v, b + v, c - v) + v);
      }
    }
  }
  if ((a + c) % 2 == 0) {
    long long v = max(a, c) - (a + c) / 2;
    if (b >= v) {
      if (a > c) {
        ret = min(ret, get(a - v, b - v, c + v) + v);
      } else if (a < c) {
        ret = min(ret, get(a + v, b - v, c - v) + v);
      }
    }
  }
  if ((a + b) % 2 == 0) {
    long long v = max(a, b) - (a + b) / 2;
    if (c >= v) {
      if (a > b) {
        ret = min(ret, get(a - v, b + v, c - v) + v);
      } else if (a < b) {
        ret = min(ret, get(a + v, b - v, c - v) + v);
      }
    }
  }
  return mpp[p] = ret;
}
int main() {
  long long a, b, c;
  while (cin >> a >> b >> c) {
    if (a > b) swap(a, b);
    if (a > c) swap(a, c);
    if (b > c) swap(b, c);
    if ((a + b) % 2 == 1) {
      cout << c << endl;
    } else {
      cout << b << endl;
    }
  }
}
