#include <bits/stdc++.h>
using namespace std;
int main() {
  int right, left, both, answer = 0;
  cin >> right >> left >> both;
  if (right == left) {
    if (both % 2 == 1) both--;
    answer = right + left + both;
    cout << answer << endl;
    return 0;
  }
  if (right == 0 && both == 0 || left == 0 && both == 0) {
    answer = 0;
    cout << answer << endl;
    return 0;
  }
  if (left > right) swap(right, left);
  while (true) {
    if (both == 0 || left == right) break;
    left++;
    both--;
  }
  if (both % 2 == 0)
    answer = 2 * left + both;
  else
    answer = 2 * left + both - 1;
  cout << answer << endl;
  return 0;
}
