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