#include <bits/stdc++.h>
using namespace std;
bool is(int n) {
  for (int i = 2; i <= sqrt(n); ++i) {
    if (n % i == 0) return false;
  }
  return true;
}
int main() {
  int l, r, a;
  cin >> l >> r >> a;
  int num;
  if (l > r) {
    if (r + a >= l) {
      num = (l + (r + a - l) / 2) * 2;
    } else {
      num = (r + a) * 2;
    }
  } else {
    if (l + a >= r) {
      num = (r + (l + a - r) / 2) * 2;
    } else {
      num = (l + a) * 2;
    }
  }
  cout << num << endl;
  return 0;
}
