Start: Jul, 01, 2019 08:30:00
2019年度暑期短学期第四天
End: Jul, 01, 2019 11:30:00
Time elapsed:
Time remaining:

Problem_ID: G
Result: Accepted
Time: 51ms
Memory: 25184kB
Author: 2018212212056
In contest: 1277

a,b=map(int,input().split())
if a>0:
    b=-b
else:
    b*=2
if (abs(b)%2==1 and a*b<0):
    a=-a
elif (abs(b)%2==0 and a*b>0):
    a=-a
print(a-b)