#include <bits/stdc++.h>
using namespace std;
void fastStream() {
  cin.tie(0);
  std::ios_base::sync_with_stdio(0);
}
int main() {
  fastStream();
  vector<long long> v;
  for (int i = 0; i < 3; i++) {
    long long t;
    cin >> t;
    v.push_back(t);
  }
  long long res = 0;
  long long tmp = min(v[2], min(v[0], v[1]));
  for (int i = 0; i < 3; i++) v[i] -= tmp;
  res += tmp;
  sort(v.begin(), v.end());
  if (v[2] == 0) {
    cout << res << endl;
  } else if (v[1] == 0) {
    long long sum = v[2];
    if (sum >= 3) {
      res += min(sum / 3, tmp);
    }
    cout << res << endl;
  } else {
    long long x = min(min(v[2] - v[1], v[1]), v[2] / 2);
    v[2] -= x * 2;
    v[1] -= x;
    res += x;
    if (v[2] > 0 && v[1] > 0) {
      long long tmp2 = min(v[2] / 3, v[1] / 3) * 3;
      res += tmp2 / 3 * 2;
      v[2] -= tmp2;
      v[1] -= tmp2;
      if (v[1] > v[2]) swap(v[1], v[2]);
      if (v[2] >= 2 && v[1] >= 1) {
        v[2] -= 2;
        v[1]--;
        res++;
        if (v[1] > v[2]) swap(v[1], v[2]);
      }
    }
    long long sum = 0;
    for (int i = 0; i < (int)v.size(); i++) {
      sum += v[i];
    }
    if (sum >= 3) {
      res += min(sum / 3, tmp);
    }
    cout << res << endl;
  }
  return 0;
}
