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