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