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