#include <bits/stdc++.h>
using namespace std;
long long x, y, z;
long long f(long long m) {
  if (m > z || (3 * m > x + y + z)) return 0;
  if (m <= x) return 1;
  if (x + y >= m) return 1;
  return 0;
}
void solve() {
  long long a, b, c;
  cin >> a >> b >> c;
  x = min({a, b, c}), z = max({a, b, c}), y = a + b + c - x - z;
  long long l = 0, r = z + 1, mid;
  while (r - l > 1) {
    mid = (l + r) >> 1;
    if (f(mid))
      l = mid;
    else
      r = mid;
  }
  cout << l;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long TESTS = 1;
  while (TESTS--) {
    solve();
  }
  return 0;
}
