We implement the desired expression , Python will be a great way to go.
The expression is
Which can be computed directly in and for the estimation precision will be good enough in python.
n=int(input())
p=1
for i in range(1,n+1):
p*=(1+(1/(i*i)))
print(p)