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