#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define MOD 1000000007 int main() { int x, y, z; cin >> x >> y >> z; int ans = min(x, y); ans += ((max(x, y) - ans + z) / 2); cout << ans << endl; return 0; }