"""
Wallis product - Pi approximation
Simple algorithm as a one-liner
"""

from __future__ import division

# Pi first decimals (generated by Wolfram Mathematica)
pi = 3.141592653589793238462643383279

n = int(raw_input('How many terms? '))

print pi
print 2 * reduce(lambda x, y: x * y,
                 [((4 * i ** 2) / (4 * i ** 2 - 1))
                 for i in range(1, n)])
