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