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