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

#952. Number of derangements (permutations where nothing stays in its place)

Find the **Number of derangements (permutations where nothing stays in its place)**. ### Input One integer n (0 ≤ n ≤ 20). ### Output Answer.

Examples

Input
9
Output
133496
Input
16
Output
7697064251745

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