#include <bits/stdc++.h>
using namespace std;
long long a, b, c;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> a >> b >> c;
  long long tmp = abs(a - b);
  if (tmp > c)
    cout << 2 * (min(a, b) + c);
  else
    cout << 2 * ((c - tmp) / 2 + max(a, b));
}
