a = int(input())max = 0i = 0while a != 0 : if a > max: max = a i += 1 a = int(input())print (i)
2 4 3 0
2
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!