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