Question regarding TZ(n) in the example exam

what does TZ(n) output in case X ends in 1? it outputs 0 is case x ends in 10, but it can’t output -1 in case x ends in 1