'''
example1_seriesII_3.png
'''

from math import log

EPS = 1e-6

x = float(input('x >>> '))

y, i = (x-1)/x, 1
s = 0
while abs(y) >= EPS:
    s += y
    i += 1
    y = y*(x-1)/x*(i-1)/i

print('s = %10.7f' % s)

yy = -log(1-(x-1)/x)

print('Формула = %10.7f' % yy)

# Первые три задачи ИЩЕМ СУММУ с точностью EPS = 1e-6



