a = [int(i) for i in input().split()]
for i in range(len(a)):
if a[i] > 0:
a.pop(i)
for i in range(len(a)):
print(a[i])
IndexError: list index out of range
a = [1, -2, 3, -4, 5, 6]
new_a = list()
for i in range(len(a)):
if a[i] < 0:
new_a.append(a[i])
print(new_a)
#[-2, -4]