user_input = input().split("\n")
sum = 0
for i in user_input:
x = int(i)
sum = sum + x
if(sum < 0):
break
else:
print(x)
EOF error while reading a line
Hey @itzsakshi26gupta, are you running the code on online IDE ? If yes then, you have to provide the custom input first and then press on RUN button.
HOPE THIS HELPS !
Happy Learning 
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.