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