Simple maths question :/

In Range A: 40

In Range B: -30

Out Range A: 0

Out Range B: 1