Trunc returns the integer part of a floating point number as an integer. Use Int to get the integer part as a floating point number.
Therefore : trunc((N-2)/3)
nest-if = if inside if, if you use else if inside if is correct, but if you use else if only is wrong
TRAIN : move the remaining units in T1 to T3 @2