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