CodeLab Academy 📞 9936 6696
← List Python · Level 9: Functions and dicts Code · 90 points ← #806 #808 →

#807. Sum of primes

You get n. Find the sum of all prime numbers not greater than n. Write an `is_prime(x)` function. ### Input One integer n (1 ≤ n ≤ 20000). ### Output A number.

Examples

Input
10527
Output
6321099
Input
2824
Output
535671

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