 Megatrolll228 
                                                27.05.2019 12:30
                                                
                                                Megatrolll228 
                                                27.05.2019 12:30
                                             2003Саша 
                                                27.05.2019 12:30
                                                
                                                2003Саша 
                                                27.05.2019 12:30
                                             Аллан123 
                                                23.05.2019 18:50
                                                
                                                Аллан123 
                                                23.05.2019 18:50
                                             hmg28409 
                                                15.10.2019 08:55
                                                
                                                hmg28409 
                                                15.10.2019 08:55
                                             shilinvanechka 
                                                15.10.2019 08:55
                                                
                                                shilinvanechka 
                                                15.10.2019 08:55
                                             plalbina 
                                                15.10.2019 08:52
                                                
                                                plalbina 
                                                15.10.2019 08:52
                                             Sanya3110 
                                                15.10.2019 08:45
                                                
                                                Sanya3110 
                                                15.10.2019 08:45
                                             nikim05 
                                                10.04.2021 20:30
                                                
                                                nikim05 
                                                10.04.2021 20:30
                                            
ss = int(input())
answer = 0
while ss != 0:
next = int(input())
if next != 0 and ss < next:
answer += 1
ss = next
print(answer)
#чтобы завершить ввод числе нужно ввести 0