#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
const int mod = 1e9 + 7;
using namespace std;
template <class T>
void cinn(T& x) {
  cin >> x;
}
template <class H, class... T>
void cinn(H& h, T&... t) {
  cinn(h);
  cinn(t...);
}
template <class A>
void cinn(vector<A>& x) {
  for (auto& a : x) cinn(a);
}
void Shazam() {
  long long l, r, b;
  cinn(l, r, b);
  long long ans = min({l, r});
  l -= ans;
  r -= ans;
  if (l == 0) {
    long long mid = min(r, b);
    r -= mid;
    b -= mid;
    ans += mid;
    cout << (ans + b / 2) * 2 << "\n";
  } else {
    long long mid = min(l, b);
    l -= mid;
    b -= mid;
    ans += mid;
    cout << (ans + b / 2) * 2 << "\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long t = 1;
  while (t--) {
    Shazam();
  }
  return 0;
}
