#include <bits/stdc++.h>
using namespace std;
map<long long, long long> mp, mm;
int main() {
  long long x, y, z, ans = 0;
  cin >> x >> y >> z;
  mp.clear();
  mm.clear();
  mp[x]++;
  mp[y]++;
  mp[z]++;
  long long xx = min(x, min(y, z));
  long long zz = max(x, max(y, z));
  long long yy;
  mm[xx]++;
  mm[zz]++;
  if (mp[x] > mm[x])
    yy = x;
  else {
    if (mp[y] > mm[y])
      yy = y;
    else
      yy = z;
  }
  x = xx;
  y = yy;
  z = zz;
  while (x > 0 || y > 0 || z > 0) {
    if (x == 0 && y == 0) break;
    if (x == 0 && z == 0) break;
    if (y == 0 && z == 0) break;
    if (x == y && x == z && y == z) {
      ans += x;
      break;
    }
    if ((x + y) * 2 <= z) {
      ans += x + y;
      break;
    } else {
      if (x == y) {
        if (z - x <= 2) {
          ans += (x + y + z) / 3;
          break;
        }
        long long k = (z - x) / 3;
        x -= k;
        y -= k;
        z -= 4 * k;
        ans += 2 * k;
      } else {
        if (y == z) {
          y -= x;
          ans += x;
          ans += 2 * y / 3;
          break;
        }
        long long k = y - x;
        if (z - 2 * k >= x) {
          ans += k;
          y -= k;
          z -= 2 * k;
        } else {
          k = z - y;
          ans += k;
          y -= k;
          z -= 2 * k;
        }
      }
    }
  }
  cout << ans;
}
