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