#include #include #include using namespace std; typedef long long int ll; int main(){ int a,b,c; cin >> a >> b >> c; int ans=min(a,b); a-=ans; b-=ans; cout << ans+(a+b+c)/2 << endl; }