CodeLab Academy 📞 9936 6696
← List Python · Level 10: Algorithms Code · 100 points ← #976 #978 →

#977. 3-bonacci

The first 3 terms are 1, and each next term is the sum of the previous 3 terms. Find the n-th term. ### Input One integer n (1 ≤ n ≤ 60). ### Output A number.

Examples

Input
54
Output
46294000891609
Input
38
Output
2698569577

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