#include <bits/stdc++.h>
int main() {
  int l, r, a, max;
  scanf("%d %d %d", &l, &r, &a);
  if (l == r) {
    l = l + a / 2;
    r = r + a / 2;
    max = l + r;
  }
  if (l > r) {
    if (a > l - r) {
      a = a - (l - r);
      r = l;
      r = r + a / 2;
      l = l + a / 2;
      max = r + l;
    } else {
      max = 2 * (r + a);
    }
  }
  if (r > l) {
    if (a > r - l) {
      a = a - (r - l);
      l = r;
      r = r + a / 2;
      l = l + a / 2;
      max = r + l;
    } else {
      max = 2 * (l + a);
    }
  }
  printf("%d", max);
  return 0;
}
