#include <iostream>
#include <cmath>
using namespace std;
int x,y,z;
int main(){
cin>>x>>y>>z;
if(x>=0){
if(y>x||y<0)
cout<<x<<endl;
else{
if(z>y)
cout<<-1<<endl;
else{
if(z>=0)
cout<<x<<endl;
else
cout<<2*abs(z)+x<<endl;
}
}
}
else{
if(y<x||y>0)
cout<<abs(x)<<endl;
else{
if(z<y)
cout<<-1<<endl;
else{
if(z<=0)
cout<<x<<endl;
else
cout<<2*abs(z)+abs(x)<<endl;
}
}
}
return 0;
}
有人能体会到WA*1(#19)的感觉吗?