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