CodeLab Academy 📞 9936 6696
← List Python · Level 5: While loops Code · 50 points ← #421 #423 →

#422. Words until stop

Words come one on each line. Stop when the word `stop` comes. How many words were there before `stop`? ### Input Words, the last one is `stop`. ### Output A number.

Examples

Input
dog
cat
sun
cat
cat
dog
stop
Output
6
Input
dog
cat
cat
stop
Output
3

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!