For this Question: Given a number n find the number of prime numbers less than equal to that number.There is only one integer containing value of n.

Constraints:-
1 <= n <= 10000000Return number of primes less than or equal to nSample Input
5

Sample Output
3

Explanation:-
2 3 and 5 are the required primes.

Sample Input
5000

Sample Output
669, I have written this Solution Code: import math
n = int(input())
n=n+1
if n<3:
      print(0)
else:
      primes=[1]*(n//2)
      for i in range(3,int(math.sqrt(n))+1,2):
            if primes[i//2]:primes[i*i//2::i]=[0]*((n-i*i-1)//(2*i)+1)
print(sum(primes)), In this Programming Language: Python, Now tell me if this Code is compilable or not?