#include <bits/stdc++.h>
using namespace std;
int main() {
  int l, r, a;
  cin >> l >> r >> a;
  while (a > 0) {
    l < r ? l++ : r++;
    a--;
  }
  int min = l < r ? l : r;
  cout << min * 2;
  return 0;
}
