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