#include <bits/stdc++.h>
using namespace std;
int n, i, j, k, l, a, b, c;
int main() {
  cin >> a >> b >> c;
  while (c) {
    if (a < b) {
      a++;
      c--;
    } else {
      b++;
      c--;
    }
  }
  cout << min(a, b) * 2;
}
