#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int l, r, a;
  cin >> l >> r >> a;
  int m = max(l, r), n = min(l, r);
  m = m - n;
  int ans = n;
  if (m > a) {
    ans += a;
  } else {
    ans += m;
    a = a - m;
    ans += a / 2;
  }
  cout << ans * 2 << endl;
  return 0;
}
