#include <bits/stdc++.h>
using namespace std;
long long readll() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int readint() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f * x;
}
int main() {
  ios::sync_with_stdio(false);
  int l, r, a;
  cin >> l >> r >> a;
  int maxn = l + r + a;
  for (int i = maxn; i >= 0; i--) {
    if (i % 2) continue;
    int t = i / 2;
    if (l >= t) {
      if (r >= t) {
        printf("%d\n", i);
        return 0;
      } else if (r + a >= t) {
        printf("%d\n", i);
        return 0;
      }
    } else {
      int tt = t - l;
      if (tt > a) continue;
      a -= tt;
      if (r >= t) {
        printf("%d\n", i);
        return 0;
      } else if (r + a >= t) {
        printf("%d\n", i);
        return 0;
      }
    }
  }
  return 0;
}
