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