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