#include <bits/stdc++.h>
using namespace std;
long long a[3], Answer = 1e18, tmp;
int main() {
  cin >> a[0] >> a[1] >> a[2];
  tmp = abs(a[0] - a[1]);
  if (tmp % 2 == 0) Answer = min(Answer, tmp / 2 + (a[0] + a[1]) / 2);
  tmp = abs(a[0] - a[2]);
  if (tmp % 2 == 0) Answer = min(Answer, tmp / 2 + (a[0] + a[2]) / 2);
  tmp = abs(a[2] - a[1]);
  if (tmp % 2 == 0) Answer = min(Answer, tmp / 2 + (a[2] + a[1]) / 2);
  cout << Answer << '\n';
  return 0;
}
