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