#include using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int x, y, z; cin >> x >> y >> z; if(pow(x - y, 2) >= pow(z, 2)) { cout << min(x, y) + z << endl; }else { cout << (x + y + z) / 2 << endl; } }