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