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