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

#415. Digital root

You get n. Find the sum of its digits, then the sum of the digits of that, and so on, until you get a one-digit number. Print that number. ### Input One integer n (0 ≤ n ≤ 10¹⁸). ### Output One digit.

Examples

Input
993229169493549453
Output
6
Input
492434442927430480
Output
1

💡 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!