#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  long long int l = 0, ri = 0, a = 0, ma = 0, mi = 0;
  cin >> l >> ri >> a;
  ma = max(l, ri);
  mi = min(l, ri);
  long long int r = ma - mi;
  if (r < a) {
    mi += r;
    a -= r;
    a /= 2;
  } else {
    mi = mi + a;
    a = 0;
  }
  cout << 2 * (mi + a) << "\n";
}
