#include <bits/stdc++.h>
using namespace std;
int main() {
  int l, r, a;
  cin >> l >> r >> a;
  if (l == 0 && a == 0 || r == 0 && a == 0)
    cout << 0 << endl;
  else if (l == r)
    cout << l + r + (a / 2) * 2 << endl;
  else if (l <= a && r <= a) {
    cout << ((l + r + a) / 2) * 2;
  } else if (l > a && r > a) {
    if (l < r) {
      int n = l + a;
      if (n <= r)
        cout << n * 2 << endl;
      else
        cout << ((r + l + a) / 2) * 2 << endl;
    } else {
      int n = r + a;
      if (n <= l)
        cout << n * 2 << endl;
      else
        cout << ((r + l + a) / 2) * 2 << endl;
    }
  } else if (l > a) {
    int n = r + a;
    if (n <= l)
      cout << n * 2 << endl;
    else
      cout << ((r + l + a) / 2) * 2 << endl;
  } else if (r > a) {
    int n = l + a;
    if (n <= r)
      cout << n * 2 << endl;
    else
      cout << ((r + l + a) / 2) * 2 << endl;
  }
}
