Monk in the Jungle

The Great Monk Maruf is planning to visit the jungle of Amazon. He loves to prepare himself rigorously for his new expeditions. So he has decided to go through everything he has learned in his life so far.


This is a companion discussion topic for the original entry at https://toph.co/p/monk-in-the-jungle
n=0
p=0
z=0
for i in range(int(input())):
    k=int(input())
    if k<0:
        n+=1
    elif k>0:
        p+=1
    else:
        z=1
print(min(p,n))

It shows Runtime Error in 3rd test case. Can anybody help?