#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, w = 1;
  char c = getchar();
  while (c < '0' || c > '9') w = c == '-' ? -1 : 1, c = getchar();
  while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + c - '0', c = getchar();
  return x * w;
}
int l, r, a, s;
int main() {
  l = read(), r = read(), a = read();
  s = l + r + a;
  if (l < r) swap(l, r);
  if (r + a >= l)
    printf("%d", s / 2 * 2);
  else
    printf("%d", (r + a) * 2);
  return 0;
}
