#include <bits/stdc++.h>
using namespace std;
int main() {
  int l, r, a, ans = 0, temp;
  cin >> l >> r >> a;
  ans += min(l, r);
  l -= ans;
  r -= ans;
  if (l == 0 && r == 0) {
    ans += a / 2;
    a = a % 2;
  } else if (l) {
    temp = min(a, l);
    ans += temp;
    a -= temp;
    l -= temp;
  } else {
    temp += min(a, r);
    ans += temp;
    a -= temp;
    r -= temp;
  }
  if (a > 1) ans += a / 2;
  cout << ans * 2 << "\n";
}
