#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) {
    long long int n, m, x, y, z, k, sum = 0, c1 = 0, c2 = 0, ans = 0;
    cin >> n >> m >> x;
    y = abs(n - m);
    ans += min(n, m);
    if (y > x) {
      z = x;
    } else {
      z = (x + y) / 2;
    }
    ans += z;
    cout << ans * 2 << endl;
  }
}
