#include <bits/stdc++.h>
using namespace std;
int min(int a, int b) {
  if (a <= b) {
    return a;
  } else {
    return b;
  }
}
int max(int a, int b) {
  if (a >= b) {
    return a;
  } else {
    return b;
  }
}
int main() {
  int l, r, a;
  cin >> l >> r >> a;
  int MAX, MIN;
  int count;
  MAX = max(l, r);
  MIN = min(l, r);
  MIN += a;
  if (MIN > MAX) {
    count = (2 * MAX) + ((MIN - MAX) / 2) * 2;
  } else {
    count = MIN * 2;
  }
  cout << count << endl;
  return 0;
}
