Thanks for the file. Unless I'm misunderstanding I think the issue in this one is that you are testing to see if the segment is 2.5cm tall, not 2.05.
Changing the expressions to the one below fixed this for me. real in = Input1;
#in = 2;
real a= if(in==2.05,1,2);
I hope that helps, please let me know if you have any further questions.