#include <bits/stdc++.h>
using namespace std;
int main() {
  int l, r, a;
  cin >> l >> r >> a;
  if (l > r) {
    int aux = r;
    r += min(a, l - r);
    a -= min(a, l - aux);
  } else if (l < r) {
    int aux = l;
    l += min(a, r - l);
    a -= min(a, r - aux);
  }
  if (a == 0 && (l == 0 || r == 0))
    cout << 0;
  else if (a > 0)
    cout << r * 2 + a / 2 * 2;
  else {
    int aux = min(l, r);
    cout << aux * 2;
  }
}
