#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a[3], ans = 0, x;
  scanf("%lld%lld%lld", &a[0], &a[1], &a[2]);
  sort(a, a + 3);
  if (a[1] >= a[0] + 3) {
    x = min(a[2] - a[1], a[1] - a[0]);
    a[2] -= 2 * x;
    a[1] -= x;
    ans += x;
    if (a[1] == a[2] && a[1] >= a[0] + 3) {
      x = a[1] - a[0];
      x /= 3;
      ans += x * 2;
      a[2] -= 3 * x;
      a[1] -= 3 * x;
    }
  }
  if (a[2] >= a[0] + 3) {
    x = min((a[2] - a[0]) / 3, a[0]);
    ans += 2 * x;
    a[2] -= 4 * x;
    a[1] -= x;
    a[0] -= x;
  }
  x = min(a[0], min(a[1], a[2]));
  ans += x;
  a[2] -= x;
  a[1] -= x;
  a[0] -= x;
  if (a[1] > 0 && a[2] > 1) {
    ans++;
  }
  printf("%lld\n", ans);
  return 0;
}
