#include <bits/stdc++.h>
using namespace std;
int l, r, a;
bool check(int x) {
  int bl = l, br = r, ba = a;
  if (bl < x) {
    if (ba >= (x - bl)) {
      bl += ba - (x - bl);
      ba -= (x - bl);
    } else
      return 0;
  }
  if (br < x) {
    if (ba >= (x - br)) {
      bl += ba - (x - br);
      ba -= (x - br);
    } else
      return 0;
  }
  return 1;
}
int main() {
  cin >> l >> r >> a;
  int left = 0, right = (l + r + a) / 2;
  while (right - left > 1) {
    int mid = (left + right) / 2;
    if (check(mid))
      left = mid;
    else
      right = mid;
  }
  int ans = 0;
  if (check(right))
    ans = right;
  else
    ans = left;
  cout << 2 * ans << endl;
}
