#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef vector vi; typedef vector vvi; typedef vector vs; #define all(c) (c).begin(), (c).end() #define loop(i,a,b) for(ll i=a; iDUMP &operator,(const T&t){if(this->tellp())*this<<", ";*this<>a[0]){ rep(i,2)cin>>a[i+1]; sort(a,a+3); int ans=0; { int x = min({a[0],a[1],a[2]}); ans += x; rep(i,3)a[i]-=x; dump(x); } { int x = min(a[1],a[2]/3); ans += x; a[1]-=x; a[2]-=x*3; } { int y = min(a[2],a[1]/3); ans += y; a[0]-=y; a[1]-=y*3; } { ans += a[1]/5 + a[2]/5; } cout << ans << endl; } }