def linear(x):
    return (((x + 1) * (((- 1) <= x) & (x < 0))) + ((1 - x) * ((0 <= x) & (x <= 1))))
def linear(x):
    return (((x + 1) * (((- 1) <= x) & (x < 0))) + ((1 - x) * ((0 <= x) & (x <= 1))))