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