# Integer Linear programming formulation if then condition

I want to create constraints such that I can implement the following condition:

Let A be an integer variable >= 0 with an upper bound of 12

I want to introduce the following variable B also an integer:

if A = 1 then B = 0 else B = A