#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  int l, r, a;
  cin >> l >> r >> a;
  int b = l - r;
  if (b < 0) b = -b;
  if (a <= b) {
    cout << 2 * (a + min(l, r)) << endl;
    return 0;
  } else {
    a -= b;
    cout << 2 * max(l, r) + a / 2 * 2 << endl;
    return 0;
  }
  return 0;
}
