Why is the output 1? Can someone explain me step by step about what is happening in the second line here?