#include <bits/stdc++.h>
using namespace std;
int a[10100], b[1010];
int main() {
  int n, m, c, ans;
  scanf("%d%d%d", &n, &m, &c);
  ans = (n + m + c) / 2;
  if (n + c >= ans && m + c >= ans)
    printf("%d\n", ans * 2);
  else
    printf("%d\n", min(n + c, m + c) * 2);
}
