#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e5 + 1;
int l, r, a;
int main() {
  cin >> l >> r >> a;
  while (a > 0) {
    if (l < r) {
      l++;
    } else {
      r++;
    }
    a--;
  }
  cout << min(l, r) * 2;
}
