#include <bits/stdc++.h>
using namespace std;
int mpow(int base, long long exp);
void ipgraph(int m);
void DFS(int n);
bool isprime(int n);
int gcd(int a, int b);
void rstgraph(int n);
const int mod = pow(10, 9) + 7;
const int N = 3e5, M = N;
vector<int> g[N];
int vis[N];
int nodes = 0;
void iluzn() {
  int l, r, a;
  cin >> l >> r >> a;
  if (l == r) {
    a = a / 2;
    cout << (l + a) * 2;
  } else {
    int x = abs(l - r);
    int mn = min(l, r);
    int mx = max(l, r);
    if (a >= x) {
      a -= x;
      a = a / 2;
      cout << (mx + a) * 2;
    } else {
      mn += a;
      cout << mn * 2;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long t = 1, i;
  while (t--) iluzn();
  return 0;
}
int mpow(int base, long long exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((long long)result * base) % mod;
    base = ((long long)base * base) % mod;
    exp >>= 1;
  }
  return result;
}
bool isprime(int n) {
  if (n < 2) return false;
  for (int x = 2; x * x <= n; x++) {
    if (n % x == 0) return false;
  }
  return true;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void ipgraph(int m) {
  int u, v;
  while (m--) {
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
}
void DFS(int n) {
  ++nodes;
  vis[n] = 1;
  for (vector<int>::iterator i = g[n].begin(); i != g[n].end(); i++) {
    if (!vis[*i]) DFS(*i);
  }
}
void rstgraph(int n) {
  int i;
  for (i = 0; i < n + 1; i++) {
    g[i].clear();
    vis[i] = 0;
  }
  nodes = 0;
}
