#include #include #include #include using ll = long long int; ll BinarySearch(ll low, ll high, std::function calc){ if(high-low==1){ return low; } if(calc((high+low)/2)){ return BinarySearch((high+low)/2, high, calc); }else{ return BinarySearch(low, (high+low)/2, calc); } } int main(){ std::ios::sync_with_stdio(false); std::cin.tie(0); ll R, G, B; std::cin >> R >> G >> B; auto calc = [=](ll n) -> bool { std::vector stone({R-n, G-n, B-n}); ll changeableNum = 0; for(auto i : stone){ changeableNum += (i>0) ? i/2 : i; } return changeableNum>=0; }; std::cout << BinarySearch(0, std::pow(2, 24), calc) << "\n"; return 0; }