#include <cstdio>

int r, g, b;

bool check(int x) {
  int pos = 0;
  int neg = 0;

  if (r >= x) pos += r - x; else neg += x - r;
  if (g >= x) pos += g - x; else neg += x - g;
  if (b >= x) pos += b - x; else neg += x - b;
  
  return pos >= 2 * neg;
}

int solve() {
  int hi = 1e7 + 1;
  int lo = 0;
  while (hi - lo > 1) {
    int mi = (lo + hi) / 2;
    if (check(mi))
      lo = mi;
    else
      hi = mi;
  }
  return lo;
}

int main(int argc, char *argv[])
{
  scanf(" %d %d %d", &r, &g, &b);
  printf("%d\n", solve());
  return 0;
}