#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL),
      cout << fixed, cout << setprecision(10);
  int l, r, a, ans = 0;
  cin >> l >> r >> a;
  ans += min(l, r);
  l -= ans, r -= ans;
  ans *= 2;
  while (a > 0) {
    if (l == r) {
      l += a / 2;
      r += a / 2;
      break;
    } else if (l > r && a > 0) {
      int c = min(a, abs(r - l));
      r += c;
      a -= c;
    } else if (r > l && a > 0) {
      int c = min(a, abs(r - l));
      l += c;
      a -= c;
    }
  }
  ans += min(l, r) * 2;
  cout << ans;
  return 0;
}
