#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int l, r, a;
int main() {
  cin >> l >> r >> a;
  int ans = 0;
  int dtl = min(max(0, r - l), a);
  int dtr = min(max(0, l - r), a);
  l += dtl;
  r += dtr;
  a -= dtl;
  a -= dtr;
  l += a / 2;
  r += a / 2;
  cout << 2 * min(l, r);
  return 0;
}
