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