#include using namespace std; #define REP(i, n) for(int(i)=0;(i)<(n);++(i)) int main(){ int a[3]; REP(i,3) cin >> a[i]; int c = min(min(a[0],a[1]),a[2]); REP(i,3) a[i] -= c; sort(a,a+3); while(a[1] > 0 && a[2] > 2){ int k = min(a[1],a[2]/3); if(k > 1) k /= 2; a[1]-=k; a[2]-=k*3; c += k; sort(a,a+3); } if(a[1] == 0 && a[2] > 4){ c += a[2]/5; } cout << c << endl; return 0; }