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