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