#include using namespace std; #define int long long signed main(){ int X,Y,Z; cin>>X>>Y>>Z; if(X < Y) swap(X,Y); if(X-Y > Z){ Y += Z; Z = 0; } else{ Z -= X-Y; Y = X; } cout<