#include <bits/stdc++.h>
using namespace std;
const int N = 4e5 + 100;
long long int inf = 1e17 + 100;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long int r, b, g;
  cin >> r >> b >> g;
  long long int sum = r + b + g, mx = max({r, b, g});
  cout << min(sum / 3, sum - mx) << endl;
  return 0;
}
