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