#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chkmax(T &a, const T &b) {
  return b > a ? a = b, true : false;
}
template <class T>
inline bool chkmin(T &a, const T &b) {
  return b < a ? a = b, true : false;
}
template <class T>
using MaxHeap = priority_queue<T>;
template <class T>
using MinHeap = priority_queue<T, vector<T>, greater<T>>;
const long long MAXn = 1e5 + 5;
const long long MOD = 1000000007;
const long long INF = (long long)1e18;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  long long l, r, a, tmp;
  long long ans = 0;
  cin >> l >> r >> a;
  while (a > 0) {
    a--;
    if (l >= r)
      r++;
    else
      l++;
  }
  ans = min(l, r);
  cout << ans * 2 << '\n';
}
