#include <bits/stdc++.h>
using namespace std;
int i, j;
int main() {
  int r, l, a, num;
  cin >> l >> r >> a;
  if (l >= r) {
    num = l - r;
    if (a <= num) {
      cout << 2 * (a + r);
      return 0;
    } else if (a > num) {
      int b = a - num;
      cout << (l + b / 2) * 2;
      return 0;
    }
  } else {
    num = r - l;
    if (a <= num) {
      cout << 2 * (a + l);
      return 0;
    } else if (a > num) {
      int b = a - num;
      cout << (r + b / 2) * 2;
      return 0;
    }
  }
}
