#include <bits/stdc++.h>
using namespace std;
long long st0[3];
int main() {
  long long i, j, k, l, n, m, a, t, s, x, y;
  cin >> st0[0] >> st0[1] >> st0[2];
  sort(st0, st0 + 3);
  if (st0[0] >= 1 && (st0[1] - st0[0]) % 3 == 2 && (st0[2] - st0[0]) % 3 == 2) {
    k = st0[0] - 1;
    k += (st0[1] - st0[0] + 1) / 3;
    k += (st0[2] - st0[0] + 1) / 3;
  } else {
    k = st0[0];
    k += (st0[1] - st0[0]) / 3;
    k += (st0[2] - st0[0]) / 3;
  }
  cout << k << endl;
  return 0;
}
