#include <bits/stdc++.h>
using namespace std;
int main() {
  int l, r, a;
  cin >> l >> r >> a;
  int tp = 0;
  int mn = min(l, r);
  if (mn == l) {
    tp += l * 2;
    r -= l;
    l = 0;
  } else {
    tp += r * 2;
    l -= r;
    r = 0;
  }
  while (a > 0) {
    int mx = max(l, r);
    if (mx > 0) {
      if (mx == l) {
        l--;
        a--;
        tp += 2;
        continue;
      } else {
        r--;
        a--;
        tp += 2;
        continue;
      }
    } else {
      if (a > 1) {
        a -= 2;
        tp += 2;
        continue;
      } else {
        break;
      }
    }
  }
  cout << tp;
  return 0;
}
