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