#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, ck = 0, dk = 0, k = 0, a, b, c, l, r, how;
  cin >> l >> r >> a;
  b = (l + r + a) / 2;
  c = l + a;
  n = r + a;
  ck = min(c, n);
  dk = min(ck, b);
  cout << 2 * dk << endl;
}
