#include <bits/stdc++.h>
using namespace std;
int main() {
  int l, r, a;
  cin >> l >> r >> a;
  int mini = min(l, r);
  int maxi = max(l, r);
  int diff = maxi - mini;
  mini += (diff <= a) ? diff : a;
  a -= (diff <= a) ? diff : a;
  if (a & 1) a--;
  cout << 2 * min(mini, maxi) + a;
}
